Interface to a path geometry node. More...
#include <idompathgeometry.h>
Classes | |
class | Data |
Initialization data. More... | |
Public Types | |
enum | eFillRule { eFREvenOdd , eFRNonZero } |
Specifies the algorithm to determine whether or not a point is inside a shape on the canvas. More... | |
Public Member Functions | |
virtual eFillRule | getFillRule () const =0 |
Retrieves the fill rule for the path. The valid values are specified by eFillRule. | |
virtual void | setFillRule (eFillRule fr)=0 |
Sets the fill rule for the path. The valid values are specified by eFillRule. | |
virtual const FMatrix & | getRenderTransform () const =0 |
Retrieves the render transform matrix for the path. | |
virtual void | setRenderTransform (const FMatrix &matrix)=0 |
Sets the render transform matrix for the path. | |
virtual CDOMPathFigureVect | getFigures () const =0 |
Retrieves the list of figures comprising the geometry. | |
virtual uint32 | getFiguresCount () const =0 |
Retrieves the number of figures in the geometry. | |
virtual void | clearFigures ()=0 |
Removes all the figures from the geometry. An exception is thrown if the figures in this geometry are not editable. | |
virtual void | addFigure (const IDOMPathFigurePtr &pathFigure)=0 |
Appends a figure to the path figure collection. An exception is thrown if the figures in this geometry are not editable. | |
virtual bool | getFiguresImmutable () const =0 |
Determine if the figures immutable (non-editable). | |
virtual IDOMPathGeometryPtr | getMutableGeometry (IEDLClassFactory *factory) const =0 |
Get a mutable version of the path geometry. Will return this object if the geometry is already mutable. Otherwise a new geometry will be created where the figures are editable. | |
virtual FRect | getBounds (bool applyTransform=true) const =0 |
Finds the conservative bounding box of the geometry. | |
virtual bool | getIsRect (FRect &rect)=0 |
Determines if the geometry is a simple rectangle. NB: It does not check to see if the path is closed, only that its shape is a rectangle that is orthogonal to a regular cartesian axis. | |
virtual bool | getIsRect (FPoint &startPoint, FPoint &oppositePoint, bool &firstLineIsX, bool &closed)=0 |
Determines if the geometry is a simple rectangle, and if so, determines the start point, opposite point, and whether or not the first move in the rectangle is in x. NB: It does not check to see if the path is closed, only that its shape is a rectangle that is orthogonal to a regular cartesian axis. | |
virtual IDOMShapePtr | getShape (IEDLClassFactory *factory, const FMatrix &transform, float resolution)=0 |
Get the scan-converted shape of this path geometry. | |
virtual IDOMPathGeometryPtr | getSimplifiedGeometry (IEDLClassFactory *pFactory, bool simplifyQuads, bool simplifyArcs)=0 |
Get a simplified version of this path geometry, with certain segment types reduced to simpler (or more common) types as directed. This may provide the called object if the path is already simple. | |
virtual IDOMPathGeometryPtr | getFlattenedGeometry (IEDLClassFactory *pFactory, const FMatrix &transform, float resolution)=0 |
Get a flattened version of the path; that is, with any curves converted to straight line approximations. This may provide the called object if the geometry has no curved segments. | |
Public Member Functions inherited from IEDLObject | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. | |
virtual bool | init (CClassParams *pData) |
The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. | |
Public Member Functions inherited from IRCObject | |
virtual void | addRef () const =0 |
Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
virtual bool | decRef () const =0 |
Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
Public Member Functions inherited from IDOMHashable | |
virtual | ~IDOMHashable () |
Virtual destructor. | |
virtual bool | hash (uint64 &hash)=0 |
Retrieve a hash for this object. | |
virtual uint64 | hashE () |
As hash(), but throws an exception if the operation fails. | |
Static Public Member Functions | |
static EDL_API IDOMPathGeometryPtr | create (IEDLClassFactory *factory, const FRect &rect, bool close=true, const FMatrix &renderTransform=FMatrix()) |
Simplified creator for a rectangular path geometry. The geometry will consist of a path beginning at x,y value of the rect, proceeding first in the y direction. | |
static EDL_API IDOMPathGeometryPtr | create (IEDLClassFactory *factory, const EDLSysString &abbreviatedGeometry, const FMatrix &renderTransform=FMatrix()) |
Simplified creator for a path using XPS abbreviated geometry format. | |
static EDL_API IDOMPathGeometryPtr | create (IEDLClassFactory *factory, const CDOMPathFigureVect &figures=CDOMPathFigureVect(), const FMatrix &renderTransform=FMatrix(), eFillRule fillRule=eFREvenOdd) |
Simplified creator for a path consisting of a series of figures. | |
static EDL_API IDOMPathGeometryPtr | createEllipse (IEDLClassFactory *factory, const FRect &rect, const FMatrix &renderTransform=FMatrix()) |
Simplified creator for a path consisting of a circle/ellipse touching the given rectangle on all sides. The circle/ellipse will be approximated with four cubic beziers, and will proceed in a clockwise direction. | |
static EDL_API IDOMPathGeometryPtr | createPolygon (IEDLClassFactory *factory, const FRect &rect, uint32 numSides, double rotationAngle=0.0) |
Simplified creator for a regular convex polygon path. | |
static const CClassID & | classID () |
Retrieves class id of IDOMPathGeometry. | |
Additional Inherited Members | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
Interface to a path geometry node.
A path geometry node constitutes a complete geometry definition. The smallest unit in a geometry is a segment. One or more segments are combined into a path figure definition. A path figure is a single shape comprised of continuous segments. One or more path figures collectively define an entire path geometry. A path geometry may define the fill algorithm to be used on the component path figures. A single path geometry node may be used in the data property of the path node to describe its overall geometry. A path geometry node may also be used in the clip property of the Canvas, Path, or Glyphs nodes to describe a clipping region. Instances of this type use exceptions of IEDLError for error handling.
|
pure virtual |
Appends a figure to the path figure collection. An exception is thrown if the figures in this geometry are not editable.
pathFigure | Path figure to add. |
|
inlinestatic |
Retrieves class id of IDOMPathGeometry.
|
static |
Simplified creator for a path consisting of a series of figures.
factory | The factory to use. |
figures | The figures comprising the geometry. |
renderTransform | The transform to apply to the geometry. |
fillRule | The fill rule to apply to the geometry. |
|
static |
Simplified creator for a path using XPS abbreviated geometry format.
factory | The factory to use. |
abbreviatedGeometry | Path geometry string specified using XPS abbreviated geometry syntax. |
renderTransform | The transform to apply to the geometry. |
|
static |
Simplified creator for a rectangular path geometry. The geometry will consist of a path beginning at x,y value of the rect, proceeding first in the y direction.
factory | The factory to use. |
rect | The rect to use. |
close | Whether or not the rectangular path should be closed. |
renderTransform | The transform to apply to the geometry. |
|
static |
Simplified creator for a path consisting of a circle/ellipse touching the given rectangle on all sides. The circle/ellipse will be approximated with four cubic beziers, and will proceed in a clockwise direction.
factory | The factory to use. |
rect | The rect describing the bounds of the circle/ellipse. |
renderTransform | The transform to apply to the geometry. |
|
static |
Simplified creator for a regular convex polygon path.
factory | The factory to use. |
rect | The rect describing the bounds of the polygon. |
numSides | The desired number of sides. |
rotationAngle | The desired rotation angle in degrees. |
|
pure virtual |
Finds the conservative bounding box of the geometry.
applyTransform | Controls whether or not the receiver's transform is applied to the bounds (if it has one). Passing true (default) gives you results in the coordinate space of the object enclosing the receiver, while passing false will give you results in the coordinate space active inside the object. |
|
pure virtual |
Retrieves the list of figures comprising the geometry.
|
pure virtual |
Retrieves the number of figures in the geometry.
|
pure virtual |
Determine if the figures immutable (non-editable).
|
pure virtual |
Retrieves the fill rule for the path. The valid values are specified by eFillRule.
The FillRule attribute specifies a fill algorithm. The fillable area of the geometry is defined by taking all of the contained PathFigures and applying the fill algorithm to determine the enclosed area. Fill algorithms determine how the intersecting areas of geometric shapes are combined to form a region.
|
pure virtual |
Get a flattened version of the path; that is, with any curves converted to straight line approximations. This may provide the called object if the geometry has no curved segments.
pFactory | A pointer to the EDL class factory. |
transform | The external transformation applied to the geometry. Needed to determine the visible size of the geometry, and hence influences the level of curve approximation. |
resolution | The intended display resolution. The flattened geometry will be computed such that the curved approximation is not noticeable when viewed at that resolution. |
|
pure virtual |
Determines if the geometry is a simple rectangle, and if so, determines the start point, opposite point, and whether or not the first move in the rectangle is in x. NB: It does not check to see if the path is closed, only that its shape is a rectangle that is orthogonal to a regular cartesian axis.
startPoint | Reference to receive the start point of the rectangle. |
oppositePoint | Reference to receive the opposite point of the rectangle. |
firstLineIsX | Reference to receive whether or not the first line from the start point is in x or y. |
closed | Reference to receive whether or not the geometry is closed. |
|
pure virtual |
Determines if the geometry is a simple rectangle. NB: It does not check to see if the path is closed, only that its shape is a rectangle that is orthogonal to a regular cartesian axis.
rect | Reference to receive the dimensions of the rectangle if the geometry indeed represents a rectangle. |
|
pure virtual |
Get a mutable version of the path geometry. Will return this object if the geometry is already mutable. Otherwise a new geometry will be created where the figures are editable.
factory | A pointer to the EDL class factory. |
|
pure virtual |
Retrieves the render transform matrix for the path.
|
pure virtual |
Get the scan-converted shape of this path geometry.
factory | A pointer to the EDL class factory. |
transform | The transform that should be applied before scan conversion. |
resolution | The resolution that should be used for scan conversion. |
|
pure virtual |
Get a simplified version of this path geometry, with certain segment types reduced to simpler (or more common) types as directed. This may provide the called object if the path is already simple.
pFactory | A pointer to the EDL class factory. |
simplifyQuads | If true, any quadratic segments will be converted to regular cubic segments in the simplified geometry. |
simplifyArcs | If true, any arc segments will be converted to regular cubic segments or line segments as appropriate. |
|
pure virtual |
Sets the fill rule for the path. The valid values are specified by eFillRule.
The FillRule attribute specifies a fill algorithm. The fillable area of the geometry is defined by taking all of the contained PathFigures and applying the fill algorithm to determine the enclosed area. Fill algorithms determine how the intersecting areas of geometric shapes are combined to form a region.
fr | Fill rule. |
|
pure virtual |
Sets the render transform matrix for the path.
matrix | The new render transform matrix. |