5#ifndef EDLIDOMPATHGEOMETRY_H
6#define EDLIDOMPATHGEOMETRY_H
104#define edlobj2IDOMPathSegment(src) edl_cast((IDOMPathSegment *) nullptr, src)
130#define IDOMArcSegmentClassID 0xFC8F943E, 0x23E94b1a, 0x8A078F67, 0x63F188CA
193 bool isStroked =
false,
195 double radiusX = 0.0,
double radiusY = 0.0,
double rotationAngle = 0.0,
196 bool isLargeArc =
false,
316#define edlobj2IDOMArcSegment(src) edl_cast((IDOMArcSegment *) nullptr, src)
327#define IDOMPolyLineSegmentClassID 0x858ed3ce, 0xc14b4bdf, 0x8f1fb58b, 0xa046afd2
359 bool isStroked =
true,
384#define edlobj2IDOMPolyLineSegment(src) edl_cast((IDOMPolyLineSegment *) nullptr, src)
399#define IDOMPolyBezierSegmentClassID 0xb2c0876c, 0x5f1b4e0a, 0xb6f0babb, 0x23061b1e
432 bool isStroked =
true,
459#define edlobj2IDOMPolyBezierSegment(src) edl_cast((IDOMPolyBezierSegment *) nullptr, src)
473#define IDOMPolyQuadraticBezierSegmentClassID 0x8c8ae8b7, 0x7ad64100, 0x8e55774e, 0x7e06ba34
506 bool isStroked =
true,
539#define edlobj2IDOMPolyQuadraticBezierSegment(src) edl_cast((IDOMPolyQuadraticBezierSegment *) nullptr, src)
558#define IDOMPathFigureClassID 0x69B82E30, 0xA5D24512, 0xB44599CE, 0x21AF0BFC
595 bool isClosed =
false,
596 bool isFilled =
true,
667 virtual void addSegment(
const IDOMPathSegmentPtr &pathSegment) = 0;
683#define edlobj2IDOMPathFigure(src) edl_cast((IDOMPathFigure *) nullptr, src)
711#define IDOMPathGeometryClassID 0xCC10E2AC, 0x4F8946d6, 0xA99ACB94, 0xC0379682
871 virtual void addFigure(
const IDOMPathFigurePtr &pathFigure) = 0;
972#define edlobj2IDOMPathGeometry(src) edl_cast((IDOMPathGeometry *) nullptr, src)
991#define IDOMPathGeometryBuilderClassID 0x4E87AB69, 0x634E44A5, 0x93DB169C, 0xC7C2643B
1032 virtual void lineTo(
const FPoint &point,
bool absolute =
true,
bool stroked =
true) = 0;
1047 bool absolute =
true,
bool stroked =
true) = 0;
1077 const FPoint &point,
bool absolute =
true,
bool stroked =
true) = 0;
1086 virtual void close(
bool stroked =
true) = 0;
1101#define edlobj2IDOMPathGeometryBuilder(obj) IDOMPathGeometryBuilderPtr(dynamic_cast<IDOMPathGeometryBuilder *>((IRCObject *) obj), true)
An object to represent a 128-bit globally unique ID.
Definition objclassid.h:29
EDL Object Interface.
Definition iedlobject.h:31
Definition edlvector.h:30
double rotationAngle
Definition idompathgeometry.h:174
bool isStroked
Definition idompathgeometry.h:176
FPoint point
Definition idompathgeometry.h:171
bool immutable
Definition idompathgeometry.h:170
double radiusY
Definition idompathgeometry.h:173
double radiusX
Definition idompathgeometry.h:172
Data()
Definition idompathgeometry.h:163
eSweepDirection sweepDirection
Definition idompathgeometry.h:177
bool isLargeArc
Definition idompathgeometry.h:175
Interface to Arc Segment element.
Definition idompathgeometry.h:128
virtual const FPoint & getPoint() const =0
Retrieves the end point of the arc.
virtual double getRadiusY() const =0
Retrieves the y-radius of the base ellipses.
virtual void setSweepDirection(eSweepDirection sd)=0
Sets sweep direction An exception is thrown if this segment is immutable.
virtual double getRadiusX() const =0
Retrieves the x-radius of the arc.
virtual void setRadiusY(double radiusY)=0
Sets the y-radius of the base ellipses.
static EDL_API IDOMArcSegmentPtr create(IEDLClassFactory *factory, bool isStroked=false, const FPoint &point=FPoint(), double radiusX=0.0, double radiusY=0.0, double rotationAngle=0.0, bool isLargeArc=false, eSweepDirection sweepDirection=eSDClockwise)
Simplified creator for an arc segment.
virtual void setRadiusX(double radiusX)=0
Sets the x-radius of the base ellipses. An exception is thrown if this segment is immutable.
static const CClassID & classID()
Retrieves the class id of IDOMArcSegment.
Definition idompathgeometry.h:135
virtual void setRotationAngle(double rA)=0
Sets rotation angle of the arc. An exception is thrown if this segment is immutable.
virtual void setIsLargeArc(bool isLA)=0
Sets isLargeArc. See getIsLargeArc() for a description of how isLargeArc determines the arc to be dra...
virtual bool getIsLargeArc() const =0
Retrieves isLargeArc.
virtual double getRotationAngle() const =0
Retrieves the rotation angle of the base ellipses.
virtual IDOMPathSegmentPtr convertToSimpleSegment(IEDLClassFactory *factory, const FPoint &startPoint) const =0
Create a segment that represents this arc using a simpler segment type.
virtual eSweepDirection getSweepDirection() const =0
Retrieves the sweep direction.
virtual void setPoint(const FPoint &pt)=0
Sets the end point of the arc. An exception is thrown if this segment is immutable.
@ eSDClockwise
Definition idompathgeometry.h:153
@ eSDCounterclockwise
Definition idompathgeometry.h:154
Abstract interface for objects that can be hashed.
Definition idomhashable.h:28
FMatrix renderTransform
Definition idompathgeometry.h:817
CDOMPathFigureVect figures
Definition idompathgeometry.h:818
Data()
Definition idompathgeometry.h:813
eFillRule fillRule
Definition idompathgeometry.h:816
Interface to a path geometry builder.
Definition idompathgeometry.h:988
virtual void arcTo(const FPoint &radius, double rotation, bool isLargeArc, IDOMArcSegment::eSweepDirection sweepDirection, const FPoint &point, bool absolute=true, bool stroked=true)=0
Append an elliptical arc segment to the current path. Throws an IEDLError exception on failure.
static EDL_API IDOMPathGeometryBuilderPtr create(IEDLClassFactory *factory)
Simplified creation function for IDOMPathGeometryBuilder. Throws an IEDLError exception on failure.
virtual void curveTo(const FPoint &control0, const FPoint &control1, const FPoint &point, bool absolute=true, bool stroked=true)=0
Append a section of a cubic Bézier curve to the current path. Throws an IEDLError exception on failur...
virtual void moveTo(const FPoint &point, bool absolute=true)=0
Move to the given user point. Throws an IEDLError exception on failure.
virtual void quadCurveTo(const FPoint &control, const FPoint &point, bool absolute=true, bool stroked=true)=0
Append a section of a quadratic Bézier curve to the current path. Throws an IEDLError exception on fa...
virtual IDOMPathGeometryPtr createGeometry(IEDLClassFactory *pFactory, IDOMPathGeometry::eFillRule fillRule, bool ignoreDegenerateSubpaths=false, const FMatrix &renderTransform=FMatrix()) const =0
Get the path as geometry, in user units according to the given CTM and fill rule. Throws an IEDLError...
virtual void lineTo(const FPoint &point, bool absolute=true, bool stroked=true)=0
Append a line segment to the current path. Throws an IEDLError exception on failure.
virtual void close(bool stroked=true)=0
Close the subpath, if it is not already. Throws an IEDLError exception on failure.
static const CClassID & classID()
Retrieves class id of IDOMPathGeometryBuilder.
Definition idompathgeometry.h:997
Interface to a path geometry node.
Definition idompathgeometry.h:709
virtual void clearFigures()=0
Removes all the figures from the geometry. An exception is thrown if the figures in this geometry are...
static const CClassID & classID()
Retrieves class id of IDOMPathGeometry.
Definition idompathgeometry.h:800
virtual const FMatrix & getRenderTransform() const =0
Retrieves the render transform matrix for the path.
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,...
virtual uint32 getFiguresCount() const =0
Retrieves the number of figures in 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,...
virtual bool getFiguresImmutable() const =0
Determine if the figures immutable (non-editable).
virtual IDOMShapePtr getShape(IEDLClassFactory *factory, const FMatrix &transform, float resolution)=0
Get the scan-converted shape of this path geometry.
virtual eFillRule getFillRule() const =0
Retrieves the fill rule for the path. The valid values are specified by eFillRule.
virtual void addFigure(const IDOMPathFigurePtr &pathFigure)=0
Appends a figure to the path figure collection. An exception is thrown if the figures in this geometr...
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 ...
virtual IDOMPathGeometryPtr getMutableGeometry(IEDLClassFactory *factory) const =0
Get a mutable version of the path geometry. Will return this object if the geometry is already mutabl...
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 side...
virtual FRect getBounds(bool applyTransform=true) const =0
Finds the conservative bounding box of the geometry.
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 approximatio...
virtual void setFillRule(eFillRule fr)=0
Sets the fill rule for the path. The valid values are specified by eFillRule.
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.
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 createPolygon(IEDLClassFactory *factory, const FRect &rect, uint32 numSides, double rotationAngle=0.0)
Simplified creator for a regular convex polygon path.
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.
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 mor...
@ eFREvenOdd
Use the even/odd fill algorithm.
Definition idompathgeometry.h:734
@ eFRNonZero
Use the non-zero fill algorithm.
Definition idompathgeometry.h:735
Interface to path segment element. The path segment is the smallest unit in a path geometry.
Definition idompathgeometry.h:46
virtual void setImmutable()=0
Force the segment to be flagged immutable.
virtual bool getIsImmutable() const =0
Determine if the segment is immutable (non-editable).
virtual eSegmentType getSegmentType() const =0
Retrieves the type of the path segment.
virtual void setIsStroked(bool isStroked)=0
Sets the value of IsStroked. IsStroked specifies whether the stroke for this segment of the path is d...
virtual FRect getBounds(FPoint &startPoint) const =0
Gets the conservative bounding box of the segment given the start point.
virtual bool getIsStroked() const =0
Retrieves the value for IsStroked. IsStroked specifies whether the stroke for this segment of the pat...
virtual const FPoint & getEndPoint() const =0
Gets the end point of the segment.
@ eArc
Arc segment.
Definition idompathgeometry.h:56
@ eUnknownSegment
Unknown segment.
Definition idompathgeometry.h:55
@ ePolyBezier
Poly Bézier segment.
Definition idompathgeometry.h:58
@ ePolyLine
Polyline segment.
Definition idompathgeometry.h:57
@ ePolyQuadraticBezier
Polyquadratic Bézier segment.
Definition idompathgeometry.h:59
bool immutable
Definition idompathgeometry.h:419
CFPointVect points
Definition idompathgeometry.h:421
bool isStroked
Definition idompathgeometry.h:420
Data()
Definition idompathgeometry.h:417
Interface to a path segment node describing a set of cubic Bézier curves.
Definition idompathgeometry.h:398
static EDL_API IDOMPolyBezierSegmentPtr create(IEDLClassFactory *factory, bool isStroked=true, const CFPointVect &points=CFPointVect())
Simplified creator for a bézier segment.
virtual uint32 getPointsCount() const =0
Retrieves the number of points in the points list. For béziers, the number of points will be a multip...
virtual const CFPointVect & getPoints() const =0
Retrieves the points that make up this segment. For béziers, the number of points will be a multiple ...
virtual void clearPoints()=0
Clears the points list. An exception is thrown if this segment is immutable.
virtual void addPoint(const FPoint &point)=0
Append a point to the list. An exception is thrown if this segment is immutable.
static const CClassID & classID()
Retrieves class id of IDOMPolyBezierSegment.
Definition idompathgeometry.h:405
bool isStroked
Definition idompathgeometry.h:348
Data()
Definition idompathgeometry.h:345
bool immutable
Definition idompathgeometry.h:347
CFPointVect points
Definition idompathgeometry.h:349
Interface to a polyline segment node. A polyline segment describes a polygonal drawing containing an ...
Definition idompathgeometry.h:326
virtual void clearPoints()=0
Clears the points list. An exception is thrown if this segment is immutable.
virtual uint32 getPointsCount() const =0
Retrieves the number of points in the segment.
static const CClassID & classID()
Retrieves class id of IDOMPolyLineSegment.
Definition idompathgeometry.h:333
static EDL_API IDOMPolyLineSegmentPtr create(IEDLClassFactory *factory, bool isStroked=true, const CFPointVect &points=CFPointVect())
Simplified creator for a line segment.
virtual const CFPointVect & getPoints() const =0
Retrieves the points that make up this segment.
virtual void addPoint(const FPoint &point)=0
Appends a point to the list. An exception is thrown if this segment is immutable.
Data()
Definition idompathgeometry.h:491
bool immutable
Definition idompathgeometry.h:493
bool isStroked
Definition idompathgeometry.h:494
CFPointVect points
Definition idompathgeometry.h:495
Interface to a polyquadratic Bézier segment. A polyqualdratic Bézier segment describes a set of quadr...
Definition idompathgeometry.h:472
virtual void clearPoints()=0
Clears the points list. An exception is thrown if this segment is immutable.
virtual uint32 getPointsCount() const =0
Retrieves the number of points in the points list. For quadratic béziers, the number of points will b...
virtual IDOMPolyBezierSegmentPtr convertToCubicBezierSegment(IEDLClassFactory *factory, const FPoint &startPoint) const =0
Create a segment that represents this curve using a cubic bézier.
virtual const CFPointVect & getPoints() const =0
Retrieves the points that make up this segment. For quadratic béziers, the number of points will be a...
static EDL_API IDOMPolyQuadraticBezierSegmentPtr create(IEDLClassFactory *factory, bool isStroked=true, const CFPointVect &points=CFPointVect())
Simplified creator for a quadratic bézier segment.
static const CClassID & classID()
Retrieves the class id of IDOMPolyQuadraticBezierSegment.
Definition idompathgeometry.h:479
virtual void addPoint(const FPoint &point)=0
Append a point to the list. An exception is thrown if this segment is immutable.
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
PointTmpl< double > FPoint
Definition edlgeom.h:102
CTransformMatrix< double > FMatrix
Definition edlgeom.h:1208
RectTmpl< double > FRect
Definition edlgeom.h:338
CEDLVector< FPoint > CFPointVect
Definition edlgeom.h:106
#define _END_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:110
#define _BEGIN_EDL_DOM_NAMESPACE
Definition edlnamespaces.h:109
std::string EDLSysString
Definition edlstring.h:158
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
unsigned int uint32
Definition edltypes.h:34
#define EDL_API
Definition edltypes.h:86
eSweepDirection
The direction of the sweep-clockwise or counter clockwise-between the start and end points.
Definition idompathgeometry.h:152
eFillRule
Specifies the algorithm to determine whether or not a point is inside a shape on the canvas.
Definition idompathgeometry.h:733
eSegmentType
Path segment type enumeration.
Definition idompathgeometry.h:54
#define IDOMPolyLineSegmentClassID
Definition idompathgeometry.h:327
#define IDOMPolyQuadraticBezierSegmentClassID
Definition idompathgeometry.h:473
#define IDOMPolyBezierSegmentClassID
Definition idompathgeometry.h:399
#define IDOMArcSegmentClassID
Definition idompathgeometry.h:130
#define IDOMPathGeometryClassID
Definition idompathgeometry.h:711
#define IDOMPathGeometryBuilderClassID
Definition idompathgeometry.h:991
CEDLVector< IDOMPathFigurePtr > CDOMPathFigureVect
Definition idompathgeometry.h:685
CEDLVector< IDOMPathSegmentPtr > CDOMPathSegmentVect
Definition idompathgeometry.h:541
#define IDOMPathFigureClassID
Definition idompathgeometry.h:558
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211