PathProcessor Class Reference

This is the abstract base class for all PathProcessors. More...

#include <pathpcs.h>

Inheritance diagram for PathProcessor:

CCObject SimpleCCObject BevelAttributePathProcessor BevelPathProcessor ContourNodePathProcessor InsetPathPathProcessor PathProcessorBrush PathProcessorStroke SumAllPathsPathProcessor BlendedPathProcessorBrush PathProcessorStrokeAirbrush PathProcessorStrokeVector List of all members.

Public Member Functions

 PathProcessor ()
 Constructor.
virtual ~PathProcessor ()
 Destructor.
virtual void ProcessPath (Path *pPath, RenderRegion *pRender, PathShape ShapePath=PATHSHAPE_PATH)=0
virtual BOOL WillChangeFillAndStrokeSeparately (void)
 Called by the RenderRegion to determine if this PathProcessor affects the "fill" and "stroke" portions of the path separately. (Generally speaking, only fill/stroke providers will cause these two different "bits" of a path to be rendered separately). This call is made BEFORE this Processor's ProcessPath function will be called.
AttributeValueGetParentAttr (void)
void SetParentAttr (AttributeValue *pParent)
virtual BOOL IsAPathProcessorBrush ()
virtual BOOL IsAPathProcessorStroke ()
PathProcessorGetNextProcessor (void)
void SetNextProcessor (PathProcessor *pNext)
virtual BOOL DoBecomeA (BecomeA *pBecomeA, Path *pPath, Node *pParent)
virtual BOOL NeedsTransparency () const
virtual BOOL DoesActuallyDoAnything (RenderRegion *pRender)
 ABSTRACT FUNCTION - see derived classesTo determine whether or not our path processor is 'default' i.e. if does not change the path at all. If so then the render region will be free to use DrawPathToOutputDevice which will let us use dash patterns, arrowheads etc.
void SetDisabled (BOOL Value)
 Sets the flag which we use to determine whether or not we should do anything when it comes to rendering.
BOOL IsDisabled ()
virtual BOOL AllowsPropertiesDialog (void)

Private Member Functions

 CC_DECLARE_DYNAMIC (PathProcessor)

Private Attributes

PathProcessorNextProcessor
AttributeValueParentAttr
BOOL m_DisableMe

Friends

class RenderRegion

Detailed Description

This is the abstract base class for all PathProcessors.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/12/96
These classes are created by attributes (or similar) when rendered, and placed on a stack in the RenderRegion. Whenever RenderRegion::DrawPath is invoked to render a path, all stacked PathProcessors will be called in turn, and they call back to RenderRegion functions to render whatever they wish (usually a modified form of the original path).

This can be used to "filter" almost any rendering, but is mainly intended for use by stroke and fill providers, which replace input paths with more suitable shapes to be rendered.

See also:
RenderRegion::DrawPath; PathProcessor::ProcessPath

Definition at line 132 of file pathpcs.h.


Constructor & Destructor Documentation

PathProcessor::PathProcessor  ) 
 

Constructor.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/12/96

Definition at line 124 of file pathpcs.cpp.

00125 {
00126     NextProcessor = NULL;
00127     ParentAttr    = NULL;
00128     m_DisableMe   = FALSE;
00129 }

PathProcessor::~PathProcessor  )  [virtual]
 

Destructor.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/12/96
Returns:
Errors: If this object still has a non-NULL Next pointer, it will ERROR3 in an effort to get you to clean up properly before destruction.

Definition at line 147 of file pathpcs.cpp.

00148 {
00149     ERROR3IF(NextProcessor != NULL, "PathProcessor deleted while still possibly held in stack");
00150 }


Member Function Documentation

virtual BOOL PathProcessor::AllowsPropertiesDialog void   )  [inline, virtual]
 

Reimplemented in PathProcessorStrokeVector.

Definition at line 175 of file pathpcs.h.

00175 {return FALSE;}

PathProcessor::CC_DECLARE_DYNAMIC PathProcessor   )  [private]
 

virtual BOOL PathProcessor::DoBecomeA BecomeA pBecomeA,
Path pPath,
Node pParent
[inline, virtual]
 

Reimplemented in PathProcessorBrush, and PathProcessorStroke.

Definition at line 163 of file pathpcs.h.

00163 {return FALSE;}

BOOL PathProcessor::DoesActuallyDoAnything RenderRegion pRender  )  [virtual]
 

ABSTRACT FUNCTION - see derived classesTo determine whether or not our path processor is 'default' i.e. if does not change the path at all. If so then the render region will be free to use DrawPathToOutputDevice which will let us use dash patterns, arrowheads etc.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/10/2000
Parameters:
pRender - pointer to the render region that we are about to render our path into [INPUTS]
Returns:
TRUE if it is anticipated that this path processor will alter the path in any way, FALSE if not

Errors:

Reimplemented in PathProcessorBrush, and PathProcessorStroke.

Definition at line 234 of file pathpcs.cpp.

00235 {
00236     return !m_DisableMe;
00237 }

PathProcessor* PathProcessor::GetNextProcessor void   )  [inline]
 

Definition at line 160 of file pathpcs.h.

00160 { return(NextProcessor); };

AttributeValue* PathProcessor::GetParentAttr void   )  [inline]
 

Definition at line 150 of file pathpcs.h.

00150 { return(ParentAttr); };

virtual BOOL PathProcessor::IsAPathProcessorBrush  )  [inline, virtual]
 

Reimplemented in PathProcessorBrush.

Definition at line 156 of file pathpcs.h.

00156 { return FALSE;} // identifier

virtual BOOL PathProcessor::IsAPathProcessorStroke  )  [inline, virtual]
 

Reimplemented in PathProcessorStroke.

Definition at line 157 of file pathpcs.h.

00157 { return FALSE;}

BOOL PathProcessor::IsDisabled void   ) 
 

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/10/00
Parameters:
- [INPUTS]
Returns:
Whether or not we are disabled

Definition at line 271 of file pathpcs.cpp.

00272 {
00273     return m_DisableMe;
00274 }

virtual BOOL PathProcessor::NeedsTransparency void   )  const [inline, virtual]
 

Reimplemented in PathProcessorStrokeAirbrush, PathProcessorBrush, PathProcessorStroke, and PathProcessorStrokeVector.

Definition at line 165 of file pathpcs.h.

00165 {return FALSE;};

virtual void PathProcessor::ProcessPath Path pPath,
RenderRegion pRender,
PathShape  ShapePath = PATHSHAPE_PATH
[pure virtual]
 

Implemented in SumAllPathsPathProcessor, InsetPathPathProcessor, ContourNodePathProcessor, PathProcessorStrokeAirbrush, BevelPathProcessor, BevelAttributePathProcessor, PathProcessorBrush, PathProcessorStroke, and PathProcessorStrokeVector.

void PathProcessor::SetDisabled BOOL  Value  ) 
 

Sets the flag which we use to determine whether or not we should do anything when it comes to rendering.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/10/00
Parameters:
Whether or not to disable this PPB [INPUTS]

Definition at line 253 of file pathpcs.cpp.

00254 {
00255     m_DisableMe = Value;
00256 }

void PathProcessor::SetNextProcessor PathProcessor pNext  )  [inline]
 

Definition at line 161 of file pathpcs.h.

00161 { ERROR3IF(pNext == this, "Awooga!"); NextProcessor = pNext; };

void PathProcessor::SetParentAttr AttributeValue pParent  )  [inline]
 

Definition at line 151 of file pathpcs.h.

00151 { ParentAttr = pParent; };

BOOL PathProcessor::WillChangeFillAndStrokeSeparately void   )  [virtual]
 

Called by the RenderRegion to determine if this PathProcessor affects the "fill" and "stroke" portions of the path separately. (Generally speaking, only fill/stroke providers will cause these two different "bits" of a path to be rendered separately). This call is made BEFORE this Processor's ProcessPath function will be called.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/12/96
If the caller gets a TRUE back, the stroke and fill paths will be rendered separately.

Notes: Base class implementation returns FALSE. Derived Stroke and Fill processors should probably override this method to return TRUE.

Reimplemented in PathProcessorStrokeAirbrush, PathProcessorStroke, and PathProcessorStrokeVector.

Definition at line 175 of file pathpcs.cpp.

00176 {
00177     return(FALSE);
00178 }


Friends And Related Function Documentation

friend class RenderRegion [friend]
 

Reimplemented in PathProcessorStrokeAirbrush, PathProcessorStroke, and PathProcessorStrokeVector.

Definition at line 134 of file pathpcs.h.


Member Data Documentation

BOOL PathProcessor::m_DisableMe [private]
 

Reimplemented in PathProcessorBrush.

Definition at line 182 of file pathpcs.h.

PathProcessor* PathProcessor::NextProcessor [private]
 

Definition at line 179 of file pathpcs.h.

AttributeValue* PathProcessor::ParentAttr [private]
 

Definition at line 180 of file pathpcs.h.


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