MetafileView Class Reference

Simple view class for metafiles to use when rendering via a Camelot RenderRegion. More...

#include <metaview.h>

Inheritance diagram for MetafileView:

View ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual BOOL ViewStateChanged ()
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual void SetViewPixelSize ()
 Sets up the pixel size for this view object.
virtual void ContinueRenderView (RenderRegion *, Spread *, BOOL=TRUE, BOOL=TRUE, BOOL bForceImmediate=FALSE)
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual CDCGetRenderDC ()
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual BOOL GetForeBackMode ()
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual void SetForeBackMode (BOOL)
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual DocRect GetDocViewRect (Spread *)
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual void SetExtent (DocCoord, DocCoord)
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
virtual WorkRect GetViewRect ()
 None - MetafileView is a skeleton class that is only used to access screen characteristics.
INT32 GetMetafileFlatness ()
 Allows the format that metafiles are saved in to change, without changing everything else in the world.
INT32 GetMetafileDPI ()
 Allows the format that metafiles are saved in to change, without changing everything else in the world.
INT32 GetMetafileMapMode ()
 Allows the format that metafiles are saved in to change, without changing everything else in the world.
void GetScaleFactor (FIXED16 *pXScale, FIXED16 *pYScale)
 Allows the format that metafiles are saved in to change, without changing everything else in the world.

Private Member Functions

 CC_DECLARE_DYNAMIC (MetafileView)
BOOL Init ()
 Initialise the MetafileView for rendering.

Detailed Description

Simple view class for metafiles to use when rendering via a Camelot RenderRegion.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
See also:
View

Definition at line 117 of file metaview.h.


Member Function Documentation

MetafileView::CC_DECLARE_DYNAMIC MetafileView   )  [private]
 

void MetafileView::ContinueRenderView RenderRegion ,
Spread ,
BOOL  = TRUE,
BOOL  = TRUE,
BOOL  bForceImmediate = FALSE
[virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Parameters:
N/A [INPUTS]
See also:
MetafileView
Returns:
Errors: Always => ERROR3

Implements View.

Definition at line 206 of file metaview.cpp.

00208 {
00209     ERROR3("MetafileView::ContinueRenderView() should not be called!");
00210 }

DocRect MetafileView::GetDocViewRect Spread  )  [virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Parameters:
N/A [INPUTS]
Returns:
An empty rectangle (always).
See also:
MetafileView

Implements View.

Definition at line 282 of file metaview.cpp.

00283 {
00284     DocRect Empty;
00285     return Empty;
00286 }

BOOL MetafileView::GetForeBackMode  )  [virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
FALSE - Metafiles don't do background rendering.
See also:
MetafileView

Implements View.

Definition at line 243 of file metaview.cpp.

00244 {
00245     // MetafileViews don't background render.
00246     return FALSE;
00247 }

INT32 MetafileView::GetMetafileDPI  ) 
 

Allows the format that metafiles are saved in to change, without changing everything else in the world.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
the number of pixels per inch for the metafile we are creating

Definition at line 360 of file metaview.cpp.

00361 {
00362     // We are currently using HIENGLISH mapping mode, which is at 1000 dpi
00363     return 1000;
00364 }

INT32 MetafileView::GetMetafileFlatness  ) 
 

Allows the format that metafiles are saved in to change, without changing everything else in the world.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
The flatness to use for metafiles

Definition at line 339 of file metaview.cpp.

00340 {
00341     // Say how much we are prepared to flatten paths
00342     return 1024;
00343 }

INT32 MetafileView::GetMetafileMapMode  ) 
 

Allows the format that metafiles are saved in to change, without changing everything else in the world.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
The mapping mode to use for metafiles. This is currently MM_HIENGLISH

Definition at line 381 of file metaview.cpp.

00382 {
00383     // return the mapping mode we want to use
00384     return MM_ANISOTROPIC;
00385 }

CDC * MetafileView::GetRenderDC  )  [virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
NULL (always)
See also:
MetafileView

Implements View.

Definition at line 225 of file metaview.cpp.

00226 {
00227     return NULL;
00228 }

void MetafileView::GetScaleFactor FIXED16 pXScale,
FIXED16 pYScale
 

Allows the format that metafiles are saved in to change, without changing everything else in the world.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Parameters:
pXScale,pYScale - the x and y scale factor to render the drawing to, [OUTPUTS] to get the best range of values from the coord system.

Definition at line 402 of file metaview.cpp.

00403 {
00404     // boost the scale to get the most out of the coord range.
00405     // We get this figure as we need to get 1000 dpi, but a scale of 1 will give 96 dpi
00406     // ie 1000/96 = 10.42
00407     *pXScale = FIXED16(1);
00408     *pYScale = FIXED16(1);
00409 }

WorkRect MetafileView::GetViewRect  )  [virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
An empty rectangle (always).
See also:
MetafileView

Implements View.

Definition at line 318 of file metaview.cpp.

00319 {
00320     WorkRect Empty;
00321     return Empty;
00322 }

BOOL MetafileView::Init void   )  [private]
 

Initialise the MetafileView for rendering.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
TRUE if initialised ok; FALSE if not
See also:
MetafileView

Reimplemented from SimpleCCObject.

Definition at line 128 of file metaview.cpp.

00129 {
00130     // Metafiles are always exported in the same format.
00131     // This is HIENGLISH which has 1000 pixels per inch.
00132     // As a result, we know that there are 72 millipoints per pixel.
00133     PixelWidth  = FIXED16(72);
00134     PixelHeight = FIXED16(72);
00135     
00136     // The scaled version are the same
00137     ScaledPixelWidth  = PixelWidth;
00138     ScaledPixelHeight = PixelHeight;
00139 
00140     // Get ourselves a ViewState object
00141     pVState = new ViewState;
00142     if (pVState == NULL) 
00143         return FALSE;
00144 
00145     // Connect this view state to this view
00146     pVState->pView = this;
00147 
00148     // No document for metafiles
00149     pDoc = NULL;
00150 
00151     // All ok
00152     return TRUE;
00153 }

void MetafileView::SetExtent DocCoord  ,
DocCoord 
[virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Parameters:
N/A [INPUTS]
See also:
MetafileView

Implements View.

Definition at line 301 of file metaview.cpp.

00302 {
00303 }

void MetafileView::SetForeBackMode BOOL   )  [virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Parameters:
N/A [INPUTS]
See also:
MetafileView
Returns:
Errors: ERROR3 always - dialogs cannot background render!

Implements View.

Definition at line 263 of file metaview.cpp.

00264 {
00265     ERROR3("MetafileView::SetForeBackMode() should not be called!");
00266 }

void MetafileView::SetViewPixelSize  )  [virtual]
 

Sets up the pixel size for this view object.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
See also:
MetafileView

Implements View.

Definition at line 184 of file metaview.cpp.

00185 {
00186     // Set the scaled pixel size
00187     ScaledPixelWidth = PixelWidth;
00188     ScaledPixelHeight = PixelHeight;
00189 }

BOOL MetafileView::ViewStateChanged  )  [virtual]
 

None - MetafileView is a skeleton class that is only used to access screen characteristics.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/9/95
Returns:
TRUE (always).
See also:
MetafileView

Implements View.

Definition at line 168 of file metaview.cpp.

00169 {
00170     return TRUE;
00171 }


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