Mako 7.5.0 API
Loading...
Searching...
No Matches
IDOMPathGeometry Class Referenceabstract

Interface to a path geometry node. More...

#include <idompathgeometry.h>

Inheritance diagram for IDOMPathGeometry:

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 FMatrixgetRenderTransform () 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 CClassIDgetClassID () 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 CClassIDclassID ()
 Retrieves class id of IDOMPathGeometry.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

Interface to a path geometry node.

See also
IDOMPathFigure
IDOMPathNode
      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.

Member Function Documentation

◆ addFigure()

virtual void IDOMPathGeometry::addFigure ( const IDOMPathFigurePtr & pathFigure)
pure virtual

Appends a figure to the path figure collection. An exception is thrown if the figures in this geometry are not editable.

Parameters
pathFigurePath figure to add.

◆ classID()

static const CClassID & IDOMPathGeometry::classID ( )
inlinestatic

Retrieves class id of IDOMPathGeometry.

Returns
CClassID class id of the element.

◆ create() [1/3]

static EDL_API IDOMPathGeometryPtr IDOMPathGeometry::create ( IEDLClassFactory * factory,
const CDOMPathFigureVect & figures = CDOMPathFigureVect(),
const FMatrix & renderTransform = FMatrix(),
eFillRule fillRule = eFREvenOdd )
static

Simplified creator for a path consisting of a series of figures.

Parameters
factoryThe factory to use.
figuresThe figures comprising the geometry.
renderTransformThe transform to apply to the geometry.
fillRuleThe fill rule to apply to the geometry.
Returns
IDOMPathGeometryPtr The new geometry.

◆ create() [2/3]

static EDL_API IDOMPathGeometryPtr IDOMPathGeometry::create ( IEDLClassFactory * factory,
const EDLSysString & abbreviatedGeometry,
const FMatrix & renderTransform = FMatrix() )
static

Simplified creator for a path using XPS abbreviated geometry format.

Parameters
factoryThe factory to use.
abbreviatedGeometryPath geometry string specified using XPS abbreviated geometry syntax.
renderTransformThe transform to apply to the geometry.
Returns
IDOMPathGeometryPtr The new geometry.

◆ create() [3/3]

static EDL_API IDOMPathGeometryPtr IDOMPathGeometry::create ( IEDLClassFactory * factory,
const FRect & rect,
bool close = true,
const FMatrix & renderTransform = FMatrix() )
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.

Parameters
factoryThe factory to use.
rectThe rect to use.
closeWhether or not the rectangular path should be closed.
renderTransformThe transform to apply to the geometry.
Returns
IDOMPathGeometryPtr The new geometry.

◆ createEllipse()

static EDL_API IDOMPathGeometryPtr IDOMPathGeometry::createEllipse ( IEDLClassFactory * factory,
const FRect & rect,
const FMatrix & renderTransform = FMatrix() )
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.

Parameters
factoryThe factory to use.
rectThe rect describing the bounds of the circle/ellipse.
renderTransformThe transform to apply to the geometry.
Returns
IDOMPathGeometryPtr The new geometry.

◆ createPolygon()

static EDL_API IDOMPathGeometryPtr IDOMPathGeometry::createPolygon ( IEDLClassFactory * factory,
const FRect & rect,
uint32 numSides,
double rotationAngle = 0.0 )
static

Simplified creator for a regular convex polygon path.

Parameters
factoryThe factory to use.
rectThe rect describing the bounds of the polygon.
numSidesThe desired number of sides.
rotationAngleThe desired rotation angle in degrees.
Returns
IDOMPathGeometryPtr The new geometry.

◆ getBounds()

virtual FRect IDOMPathGeometry::getBounds ( bool applyTransform = true) const
pure virtual

Finds the conservative bounding box of the geometry.

Parameters
applyTransformControls 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.
Returns
FRect The conservative bounds.

◆ getFigures()

virtual CDOMPathFigureVect IDOMPathGeometry::getFigures ( ) const
pure virtual

Retrieves the list of figures comprising the geometry.

Returns
CDOMPathFigureVect The path figures.

◆ getFiguresCount()

virtual uint32 IDOMPathGeometry::getFiguresCount ( ) const
pure virtual

Retrieves the number of figures in the geometry.

Returns
uint32 Returns the number of figures in the path collection.

◆ getFiguresImmutable()

virtual bool IDOMPathGeometry::getFiguresImmutable ( ) const
pure virtual

Determine if the figures immutable (non-editable).

Returns
bool True if the figures may not be edited.

◆ getFillRule()

virtual eFillRule IDOMPathGeometry::getFillRule ( ) const
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.
Returns
eFillRule Fill rule (eRFEvenOdd default).

◆ getFlattenedGeometry()

virtual IDOMPathGeometryPtr IDOMPathGeometry::getFlattenedGeometry ( IEDLClassFactory * pFactory,
const FMatrix & transform,
float resolution )
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.

Parameters
pFactoryA pointer to the EDL class factory.
transformThe external transformation applied to the geometry. Needed to determine the visible size of the geometry, and hence influences the level of curve approximation.
resolutionThe intended display resolution. The flattened geometry will be computed such that the curved approximation is not noticeable when viewed at that resolution.
Returns
IDOMPathGeometryPtr The resulting flattened geometry, or this geometry if no flattening is required.

◆ getIsRect() [1/2]

virtual bool IDOMPathGeometry::getIsRect ( FPoint & startPoint,
FPoint & oppositePoint,
bool & firstLineIsX,
bool & closed )
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.

Parameters
startPointReference to receive the start point of the rectangle.
oppositePointReference to receive the opposite point of the rectangle.
firstLineIsXReference to receive whether or not the first line from the start point is in x or y.
closedReference to receive whether or not the geometry is closed.
Returns
bool. True if the geometry is a simple orthogonal rectangle.

◆ getIsRect() [2/2]

virtual bool IDOMPathGeometry::getIsRect ( FRect & rect)
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.

Parameters
rectReference to receive the dimensions of the rectangle if the geometry indeed represents a rectangle.
Returns
bool. True if the geometry is a simple orthogonal rectangle.

◆ getMutableGeometry()

virtual IDOMPathGeometryPtr IDOMPathGeometry::getMutableGeometry ( IEDLClassFactory * factory) const
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.

Parameters
factoryA pointer to the EDL class factory.
Returns
IDOMPathGometryPtr The mutable geometry.

◆ getRenderTransform()

virtual const FMatrix & IDOMPathGeometry::getRenderTransform ( ) const
pure virtual

Retrieves the render transform matrix for the path.

Returns
FMatrix The transformation.

◆ getShape()

virtual IDOMShapePtr IDOMPathGeometry::getShape ( IEDLClassFactory * factory,
const FMatrix & transform,
float resolution )
pure virtual

Get the scan-converted shape of this path geometry.

Parameters
factoryA pointer to the EDL class factory.
transformThe transform that should be applied before scan conversion.
resolutionThe resolution that should be used for scan conversion.
Returns
IDOMShapePtr The scan-converted shape.

◆ getSimplifiedGeometry()

virtual IDOMPathGeometryPtr IDOMPathGeometry::getSimplifiedGeometry ( IEDLClassFactory * pFactory,
bool simplifyQuads,
bool simplifyArcs )
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.

Parameters
pFactoryA pointer to the EDL class factory.
simplifyQuadsIf true, any quadratic segments will be converted to regular cubic segments in the simplified geometry.
simplifyArcsIf true, any arc segments will be converted to regular cubic segments or line segments as appropriate.
Returns
IDOMPathGeometryPtr The simplified path geometry.

◆ setFillRule()

virtual void IDOMPathGeometry::setFillRule ( eFillRule fr)
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.
Parameters
frFill rule.

◆ setRenderTransform()

virtual void IDOMPathGeometry::setRenderTransform ( const FMatrix & matrix)
pure virtual

Sets the render transform matrix for the path.

Parameters
matrixThe new render transform matrix.

The documentation for this class was generated from the following file: