ImagemapFilterOptions Class Reference

An ImagemapFilterOptions object contains all the information the ImagemapFilter needs to set itself up ready for export. More...

#include <filtimop.h>

Inheritance diagram for ImagemapFilterOptions:

CCObject SimpleCCObject List of all members.

Public Member Functions

 ImagemapFilterOptions ()
 Default constructor.
 ImagemapFilterOptions (String_256 strName, FlatteningFactor ffApprox=FF_CLOSELY, BOOL fAllRectangles=FALSE, SelectionType stExportArea=DRAWING, double dDPI=96, BOOL fClipboard=FALSE, BOOL fFile=FALSE, PathName pthFile=PathName(), BOOL fInsert=FALSE, CCLexFile *pfileFile=NULL, BOOL fReportErrors=TRUE)
 Specific constructor.
 ~ImagemapFilterOptions ()
 Destructor.
 ImagemapFilterOptions (const ImagemapFilterOptions &ifoCopy)
 Copy constructor.
ImagemapFilterOptions & operator= (const ImagemapFilterOptions &ifoCopy)
 Assignment operator.
String_256 GetImagemapName ()
FlatteningFactor GetFlatteningFactor ()
BOOL ExportAllRectangles ()
BOOL ExportToClipboard ()
BOOL ExportToFile ()
SelectionType GetExportArea ()
double GetDPI ()
PathName GetImagemapPath ()
CCLexFile * GetImagemapFile ()
BOOL Insert ()

Static Public Member Functions

static DocRect GetSizeOfExportArea (SelectionType stExportArea)
 Returns the bounding rectangle of the export area, based on the m_stExportArea member variable.
static DocCoord GetOriginOfExportArea (SelectionType stExportArea)
 Returns the top left hand corner of the export area - which is the origin from which all bitmap coordinates are taken.

Public Attributes

String_256 m_strName
FlatteningFactor m_ffApprox
BOOL m_fAllRectangles
SelectionType m_stExportArea
double m_dDPI
BOOL m_fClipboard
BOOL m_fFile
PathName m_pthFile
CCLexFile * m_pfileFile
BOOL m_fInsert
BOOL m_fReportErrors
PathName m_GraphicPath

Private Member Functions

 CC_DECLARE_DYNAMIC (ImagemapFilterOptions)

Detailed Description

An ImagemapFilterOptions object contains all the information the ImagemapFilter needs to set itself up ready for export.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/4/97

Definition at line 118 of file filtimop.h.


Constructor & Destructor Documentation

ImagemapFilterOptions::ImagemapFilterOptions (   ) 
 

Default constructor.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/4/97
Note that this default constructor is used to set up the default values on start up.

Definition at line 129 of file filtimop.cpp.

00130 {
00131     //Initialise our variables
00132     m_ffApprox=FF_APPROXIMATELY;
00133     m_fAllRectangles=FALSE;
00134     m_stExportArea=DRAWING;
00135     m_dDPI=96.0;
00136 
00137     m_fClipboard=FALSE;
00138     m_fFile=FALSE;
00139     m_fInsert=TRUE;
00140     m_pfileFile=NULL;
00141     m_fReportErrors=FALSE;
00142 }

ImagemapFilterOptions::ImagemapFilterOptions (  String_256  strName,
FlatteningFactor  ffApprox = FF_CLOSELY,
BOOL  fAllRectangles = FALSE,
SelectionType  stExportArea = DRAWING,
double  dDPI = 96,
BOOL  fClipboard = FALSE,
BOOL  fFile = FALSE,
PathName  pthFile = PathName(),
BOOL  fInsert = FALSE,
CCLexFile *  pfileFile = NULL,
BOOL  fReportErrors = TRUE
) 
 

Specific constructor.

ImagemapFilterOptions(String_256 strName, FlatteningFactor ffApprox, BOOL fAllRectangles, SelectionType stExportArea, double dDPI, BOOL fClipboard, BOOL fFile=FALSE, PathName pthFile, BOOL fInsert=FALSE, CCLexFile* pfileFile, BOOL fReportErrors );

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/4/97

Definition at line 165 of file filtimop.cpp.

00177 {
00178     //Initialise our variables
00179     m_strName=strName;
00180     m_ffApprox=ffApprox;
00181     m_fAllRectangles=fAllRectangles;
00182     m_stExportArea=stExportArea;
00183     m_dDPI=dDPI;
00184 
00185     m_fClipboard=fClipboard;
00186     m_fFile=fFile;
00187     m_pthFile=pthFile;
00188     m_fInsert=fInsert;
00189     m_pfileFile=pfileFile;
00190     m_fReportErrors=0;
00191     
00192     // init where the graphic is exported to
00193     // this makes a reasonable guess but should be set later
00194     m_GraphicPath = pthFile;
00195     m_GraphicPath.SetType("gif");
00196 }

ImagemapFilterOptions::~ImagemapFilterOptions (   ) 
 

Destructor.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/4/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 240 of file filtimop.cpp.

00241 {
00242     //Does nothing
00243 }

ImagemapFilterOptions::ImagemapFilterOptions (  const ImagemapFilterOptions &  ifoCopy  ) 
 

Copy constructor.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/4/97
Parameters:
ImagemapFilterOptions object to copy [INPUTS]
- [OUTPUTS]
Returns:
*this

Errors: -

See also:
-

Definition at line 218 of file filtimop.cpp.

00219 {
00220     //Simply use the assigment operator
00221     *this=ifoCopy;
00222                        
00223 }


Member Function Documentation

ImagemapFilterOptions::CC_DECLARE_DYNAMIC (  ImagemapFilterOptions   )  [private]
 

BOOL ImagemapFilterOptions::ExportAllRectangles (   )  [inline]
 

Definition at line 158 of file filtimop.h.

00159     {
00160         return m_fAllRectangles;
00161     }

BOOL ImagemapFilterOptions::ExportToClipboard (   )  [inline]
 

Definition at line 163 of file filtimop.h.

00164     {
00165         return m_fClipboard;
00166     }

BOOL ImagemapFilterOptions::ExportToFile (   )  [inline]
 

Definition at line 168 of file filtimop.h.

00169     {
00170         return m_fFile;
00171     }

double ImagemapFilterOptions::GetDPI (   )  [inline]
 

Definition at line 179 of file filtimop.h.

00180     {
00181         return m_dDPI;
00182     }

SelectionType ImagemapFilterOptions::GetExportArea (   )  [inline]
 

Definition at line 174 of file filtimop.h.

00175     {
00176         return m_stExportArea;
00177     }

FlatteningFactor ImagemapFilterOptions::GetFlatteningFactor (   )  [inline]
 

Definition at line 153 of file filtimop.h.

00154     {
00155         return m_ffApprox;  
00156     }

CCLexFile* ImagemapFilterOptions::GetImagemapFile (   )  [inline]
 

Definition at line 189 of file filtimop.h.

00190     {
00191         return m_pfileFile;
00192     }

String_256 ImagemapFilterOptions::GetImagemapName (   )  [inline]
 

Definition at line 148 of file filtimop.h.

00149     {
00150         return m_strName;
00151     }

PathName ImagemapFilterOptions::GetImagemapPath (   )  [inline]
 

Definition at line 184 of file filtimop.h.

00185     {
00186         return m_pthFile;
00187     }

DocCoord ImagemapFilterOptions::GetOriginOfExportArea (  SelectionType  stExportArea  )  [static]
 

Returns the top left hand corner of the export area - which is the origin from which all bitmap coordinates are taken.

DocCoord ImagemapFilterOptions::GetOriginOfExportArea(SelectionType stExportArea)

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The top left hand corner coordinate of the export area.
Note that this function assumes there are only two types of export area: the selection and the drawing.

Returns:
Errors: -
See also:
ImagemapFilterOptions::GetSizeOfExportArea

Definition at line 350 of file filtimop.cpp.

00351 {   
00352     //Get the export area rectangle
00353     DocRect rectExport=ImagemapFilterOptions::GetSizeOfExportArea(stExportArea);
00354 
00355     //This is its top left hand corner
00356     DocCoord coordToReturn(rectExport.lo.x, rectExport.hi.y);
00357     
00358     return coordToReturn; 
00359 }

DocRect ImagemapFilterOptions::GetSizeOfExportArea (  SelectionType  stExportArea  )  [static]
 

Returns the bounding rectangle of the export area, based on the m_stExportArea member variable.

static DocRect ImagemapFilterOptions::GetSizeOfExportArea(SelectionType stExportArea)

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/4/97
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The bounding rectangle of the export area
Note that this function assumes there are only two types of export area: the selection and the drawing.

Returns:
Errors: -
See also:
-

Definition at line 306 of file filtimop.cpp.

00307 {   
00308     //This is the value we will return
00309     DocRect rectBounds;
00310 
00311     //If the area to export is the selection
00312     if (stExportArea==SELECTION)
00313     {
00314         //Then get the bounding rectangle of the selection
00315         rectBounds=GetApplication()->FindSelection()->GetBoundingRect();
00316     }
00317     else
00318     {
00319         //We assume the selection area is the drawing
00320         //Get the bounds of the drawing
00321         rectBounds=BaseBitmapFilter::GetSizeOfDrawing();
00322     }
00323 
00324     return rectBounds;
00325  
00326 }

BOOL ImagemapFilterOptions::Insert (   )  [inline]
 

Definition at line 195 of file filtimop.h.

00196     {
00197         return m_fInsert;
00198     }

ImagemapFilterOptions & ImagemapFilterOptions::operator= (  const ImagemapFilterOptions &  ifoOther  ) 
 

Assignment operator.

Author:
Graham_Walmsley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/4/97
Parameters:
ifoOther Object to copy [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 260 of file filtimop.cpp.

00261 {
00262     
00263     //Simply copy the member variables across
00264     m_strName=ifoOther.m_strName;
00265     m_ffApprox=ifoOther.m_ffApprox;
00266     m_fAllRectangles=ifoOther.m_fAllRectangles;
00267     m_fClipboard=ifoOther.m_fClipboard;
00268     m_fFile=ifoOther.m_fFile;
00269     m_stExportArea=ifoOther.m_stExportArea;
00270     m_dDPI=ifoOther.m_dDPI;
00271     m_pthFile=ifoOther.m_pthFile;
00272     m_fInsert=ifoOther.m_fInsert;
00273     m_pfileFile=ifoOther.m_pfileFile;
00274     m_fReportErrors=ifoOther.m_fReportErrors;
00275     m_GraphicPath = ifoOther.m_GraphicPath;
00276 
00277     return *this;
00278 }


Member Data Documentation

double ImagemapFilterOptions::m_dDPI
 

Definition at line 213 of file filtimop.h.

BOOL ImagemapFilterOptions::m_fAllRectangles
 

Definition at line 211 of file filtimop.h.

BOOL ImagemapFilterOptions::m_fClipboard
 

Definition at line 215 of file filtimop.h.

FlatteningFactor ImagemapFilterOptions::m_ffApprox
 

Definition at line 210 of file filtimop.h.

BOOL ImagemapFilterOptions::m_fFile
 

Definition at line 216 of file filtimop.h.

BOOL ImagemapFilterOptions::m_fInsert
 

Definition at line 225 of file filtimop.h.

BOOL ImagemapFilterOptions::m_fReportErrors
 

Definition at line 228 of file filtimop.h.

PathName ImagemapFilterOptions::m_GraphicPath
 

Definition at line 231 of file filtimop.h.

CCLexFile* ImagemapFilterOptions::m_pfileFile
 

Definition at line 223 of file filtimop.h.

PathName ImagemapFilterOptions::m_pthFile
 

Definition at line 220 of file filtimop.h.

SelectionType ImagemapFilterOptions::m_stExportArea
 

Definition at line 212 of file filtimop.h.

String_256 ImagemapFilterOptions::m_strName
 

Definition at line 209 of file filtimop.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:55:23 2007 for Camelot by  doxygen 1.4.4