AIEPSGradientScanRenderRegion Class Reference

RenderRegion used to scan through the tree, looking for gradient fills to be cached for Illustrator export. More...

#include <ai_epsrr.h>

Inheritance diagram for AIEPSGradientScanRenderRegion:

VectorFileRenderRegion RenderRegion ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 AIEPSGradientScanRenderRegion (RenderRegion *pControllingRegion)
 Used to scan the tree for gradient fills when exporting to AI EPS format. The objects are rendered into this region, which then stores the fills in a gradient cache. This is necessary, as objects such as blends only allow access to the intermediate steps when they are being rendered, and any gradient fills need to be cached in the AI file before proper rendering starts.
RenderRegionGetControllingRegion ()
void SetControllingRegion (RenderRegion *pControllingRegion)
 sets the controlling AIEPSRenderRegion. I.e. the one that needs to cache the gradient fills.
virtual void DrawPathToOutputDevice (Path *PathToRender, PathShape shapePath=PATHSHAPE_PATH)
 Used to catch gradient fills on objects (mainly in blends, contours, brushes, and other objects which won't show up in the tree) so that they can be included properly in the caching system.
virtual BOOL StopRender ()
 Deinitialise the render region after rendering (exporting).
virtual void DrawRect (DocRect *RectToRender)
 None at present - this function should not be called during ink rendering.
virtual void DrawDragRect (DocRect *RectToRender)
 Should not be called for this kind of render region.
virtual void DrawLine (const DocCoord &StartPoint, const DocCoord &EndPoint)
 None at present - this function should not be called during ink rendering.
virtual void DrawPixel (const DocCoord &Point)
 Should not be called for this kind of render region.
virtual void DrawBlob (DocCoord p, BlobType type)
 Should not be called for this kind of render region.
virtual void DrawCross (const DocCoord &Point, const UINT32 Size)
 Should not be called for this kind of render region.
virtual void DrawBitmap (const DocCoord &Point, KernelBitmap *pBitmap)
 Should not be called for this kind of render region.
virtual void DrawBitmap (const DocCoord &Point, UINT32 BitmapID, UINT32 ToolID=NULL)
 Should not be called for this kind of render region.
virtual void DrawBitmapBlob (const DocCoord &Point, KernelBitmap *BlobShape)
 Should not be called for this kind of render region.
virtual void DrawBitmapBlob (const DocCoord &Point, ResourceID resID)
virtual void InitClipping ()
 Stub function.
virtual void InitAttributes ()
 Set up the default attributes for the render region. (Actually just marks the path attributes as invalid, so that we output some attribute commands before the first path we export).
virtual void SetOSDrawingMode ()
 Ensures that the drawing mode is set to DM_COPYPEN - any other drawing mode doesn't make sense when exporting EPS.
virtual MILLIPOINT CalcPixelWidth ()
 None for vector file render regions - just returns 1.
virtual MILLIPOINT CalcScaledPixelWidth ()
 None for vector file render regions - just returns 1.

Protected Attributes

RenderRegionm_pController

Detailed Description

RenderRegion used to scan through the tree, looking for gradient fills to be cached for Illustrator export.

Author:
Chris_Gallimore (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/2/2001
See also:
AIEPSRenderRegion,

Definition at line 129 of file ai_epsrr.h.


Constructor & Destructor Documentation

AIEPSGradientScanRenderRegion::AIEPSGradientScanRenderRegion RenderRegion pControllingRegion  ) 
 

Used to scan the tree for gradient fills when exporting to AI EPS format. The objects are rendered into this region, which then stores the fills in a gradient cache. This is necessary, as objects such as blends only allow access to the intermediate steps when they are being rendered, and any gradient fills need to be cached in the AI file before proper rendering starts.

Author:
Chris_Gallimore (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/2/2001
Parameters:
pControllingRegion - the AIEPSRenderRegion that created this.. [INPUTS]

Definition at line 3753 of file ai_epsrr.cpp.

03754  : VectorFileRenderRegion ()
03755 {
03756     SetControllingRegion (pControllingRegion);
03757 
03758     DocRect clipRect = pControllingRegion->GetClipRect ();
03759     SetClipRect (clipRect);
03760 }


Member Function Documentation

virtual MILLIPOINT AIEPSGradientScanRenderRegion::CalcPixelWidth void   )  [inline, virtual]
 

None for vector file render regions - just returns 1.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Width of pixels on millipoints.
See also:
VectorFileRenderRegion::CalcScaledPixelWidth

Reimplemented from VectorFileRenderRegion.

Definition at line 163 of file ai_epsrr.h.

00163 {return MILLIPOINT (1);};

virtual MILLIPOINT AIEPSGradientScanRenderRegion::CalcScaledPixelWidth void   )  [inline, virtual]
 

None for vector file render regions - just returns 1.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Scaled width of pixels on millipoints.
See also:
VectorFileRenderRegion::CalcPixelWidth

Reimplemented from VectorFileRenderRegion.

Definition at line 164 of file ai_epsrr.h.

00164 {return MILLIPOINT (1);};

virtual void AIEPSGradientScanRenderRegion::DrawBitmap const DocCoord Point,
UINT32  BitmapID,
UINT32  ToolID = NULL
[inline, virtual]
 

Should not be called for this kind of render region.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/10/00
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawBitmap

Reimplemented from VectorFileRenderRegion.

Definition at line 155 of file ai_epsrr.h.

00155 {};

virtual void AIEPSGradientScanRenderRegion::DrawBitmap const DocCoord Point,
KernelBitmap pBitmap
[inline, virtual]
 

Should not be called for this kind of render region.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/10/00
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawBitmap

Reimplemented from VectorFileRenderRegion.

Definition at line 154 of file ai_epsrr.h.

00154 {};

virtual void AIEPSGradientScanRenderRegion::DrawBitmapBlob const DocCoord Point,
ResourceID  resID
[inline, virtual]
 

Reimplemented from VectorFileRenderRegion.

Definition at line 157 of file ai_epsrr.h.

00157 {};

virtual void AIEPSGradientScanRenderRegion::DrawBitmapBlob const DocCoord Point,
KernelBitmap BlobShape
[inline, virtual]
 

Should not be called for this kind of render region.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/10/00
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawBitmap

Reimplemented from VectorFileRenderRegion.

Definition at line 156 of file ai_epsrr.h.

00156 {};

virtual void AIEPSGradientScanRenderRegion::DrawBlob DocCoord  p,
BlobType  type
[inline, virtual]
 

Should not be called for this kind of render region.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawBlob

Reimplemented from VectorFileRenderRegion.

Definition at line 151 of file ai_epsrr.h.

00151 {};

virtual void AIEPSGradientScanRenderRegion::DrawCross const DocCoord Point,
const UINT32  Size
[inline, virtual]
 

Should not be called for this kind of render region.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawCross

Reimplemented from VectorFileRenderRegion.

Definition at line 152 of file ai_epsrr.h.

00152 {};

virtual void AIEPSGradientScanRenderRegion::DrawDragRect DocRect RectToRender  )  [inline, virtual]
 

Should not be called for this kind of render region.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawDragRect

Reimplemented from VectorFileRenderRegion.

Definition at line 148 of file ai_epsrr.h.

00148 {};

virtual void AIEPSGradientScanRenderRegion::DrawLine const DocCoord StartPoint,
const DocCoord EndPoint
[inline, virtual]
 

None at present - this function should not be called during ink rendering.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: ENSURE failure if called.

Reimplemented from VectorFileRenderRegion.

Definition at line 149 of file ai_epsrr.h.

00149 {};

void AIEPSGradientScanRenderRegion::DrawPathToOutputDevice Path DrawPath,
PathShape  shapePath = PATHSHAPE_PATH
[virtual]
 

Used to catch gradient fills on objects (mainly in blends, contours, brushes, and other objects which won't show up in the tree) so that they can be included properly in the caching system.

Author:
Chris_Gallimore (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/2/2001
Parameters:
see RenderRegion::DrawPathToOutputDevice [INPUTS]
See also: RenderRegion::DrawPath

Implements RenderRegion.

Definition at line 3778 of file ai_epsrr.cpp.

03779 {
03780     FillGeometryAttribute * pFill = (FillGeometryAttribute *) CurrentAttrs[ATTR_FILLGEOMETRY].pAttr;
03781     AIEPSRenderRegion * pControl = (AIEPSRenderRegion *) GetControllingRegion ();
03782 
03783     EFFECTTYPE effect = GetFillEffect ();
03784 
03785     // Write and store the fill info it's got a gradient fill.
03786     if (pControl->IsGradientFillValidForExport (pFill) && 
03787         !pControl->FindGradientInCache (pFill, effect))
03788     {
03789         // Store this fill - function takes a copy of the whole fill (not just the pointer), 
03790         //  so this is safe. 
03791         pControl->IncludeGradientFill (pFill, effect);
03792     }
03793 
03794     // Reset the fill to RGB. This is temp, so it will be deleted when it is no longer used.
03795     SetFillEffect (new FillEffectFadeAttribute, TRUE);
03796 }

virtual void AIEPSGradientScanRenderRegion::DrawPixel const DocCoord Point  )  [inline, virtual]
 

Should not be called for this kind of render region.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: ENSURE failure if called.
See also:
RenderRegion::DrawPixel

Reimplemented from VectorFileRenderRegion.

Definition at line 150 of file ai_epsrr.h.

00150 {};

virtual void AIEPSGradientScanRenderRegion::DrawRect DocRect RectToRender  )  [inline, virtual]
 

None at present - this function should not be called during ink rendering.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: ENSURE failure if called.

Reimplemented from VectorFileRenderRegion.

Definition at line 147 of file ai_epsrr.h.

00147 {};

RenderRegion* AIEPSGradientScanRenderRegion::GetControllingRegion  )  [inline]
 

Definition at line 141 of file ai_epsrr.h.

00141 {return m_pController;}

virtual void AIEPSGradientScanRenderRegion::InitAttributes void   )  [inline, virtual]
 

Set up the default attributes for the render region. (Actually just marks the path attributes as invalid, so that we output some attribute commands before the first path we export).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
See also:
VectorFileRenderRegion::InitClipping

Reimplemented from VectorFileRenderRegion.

Definition at line 160 of file ai_epsrr.h.

00160 {};

virtual void AIEPSGradientScanRenderRegion::InitClipping void   )  [inline, virtual]
 

Stub function.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/10/00
See also:
VectorFileRenderRegion::InitAttributes

Reimplemented from VectorFileRenderRegion.

Definition at line 159 of file ai_epsrr.h.

00159 {};

void AIEPSGradientScanRenderRegion::SetControllingRegion RenderRegion pControllingRegion  ) 
 

sets the controlling AIEPSRenderRegion. I.e. the one that needs to cache the gradient fills.

Author:
Chris_Gallimore (Xara Group Ltd) <camelotdev@xara.com>
Date:
5/2/2001
Parameters:
the AIEPSRenderRegion that we need to send all the information to once we've [INPUTS] scanned it in.

Definition at line 3810 of file ai_epsrr.cpp.

03811 {
03812     ERROR3IF (!pControllingRegion->IsKindOf (CC_RUNTIME_CLASS(AIEPSRenderRegion)), "AIEPSGradientScanRenderRegion::SetControllingRegion - controlling region is not an AIEPSRegion");
03813 
03814     m_pController = pControllingRegion;
03815 }

virtual void AIEPSGradientScanRenderRegion::SetOSDrawingMode void   )  [inline, virtual]
 

Ensures that the drawing mode is set to DM_COPYPEN - any other drawing mode doesn't make sense when exporting EPS.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )
Returns:
Errors: If drawing mode is not DM_COPYPEN, ENSURE failure.

Reimplemented from VectorFileRenderRegion.

Definition at line 162 of file ai_epsrr.h.

00162 {};

virtual BOOL AIEPSGradientScanRenderRegion::StopRender void   )  [inline, virtual]
 

Deinitialise the render region after rendering (exporting).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com> ( Modified by Graeme )
Date:
30/03/94 ( Moved here on 26/10/00 )

Reimplemented from VectorFileRenderRegion.

Definition at line 146 of file ai_epsrr.h.

00146 {return FALSE;};


Member Data Documentation

RenderRegion* AIEPSGradientScanRenderRegion::m_pController [protected]
 

Definition at line 135 of file ai_epsrr.h.


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