Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
hdi::core::PathArt Class Reference

Allows for path manipulation, metadata access, trimming, extending, etc. More...

#include <hdicorePathArt.h>

Public Types

enum  WindingOrderType { WindingUnknown = 0, Clockwise = 1, CounterClockwise = 2 }
 Describes which direction the (closed) art is wound.
 
enum  SegPointSelectionState {
  SegPointNotSelected = 0, SegPointAnchorSelected = 1 << 0, SegPointInSelected = 1 << 1, SegPointOutSelected = 1 << 2,
  SegPointAllSelected = (SegPointAnchorSelected | SegPointInSelected | SegPointOutSelected)
}
 Describes how an individual segment point is selected, if at all. More...
 
enum  TrimDirectionType { TrimGreaterDirectionOnly = 1 << 0, TrimLesserDirectionOnly = 1 << 1, TrimBothDirections = (TrimGreaterDirectionOnly | TrimLesserDirectionOnly) }
 Describes which direction a trim should take place (to the greater, lesser, or both sides of a given reference point)
 
enum  TrimError {
  NoTrimError = 0, HitDataArtMustMatchTrimPathArtError = 10, TrimPathIsClosedError = 20, TrimPathNeedsAtLeast2PointsError = 30,
  InvalidSourcePathForTrimming = 40
}
 Describes various errors that can occur when trimming a path.
 
enum  ExtendError {
  NoExtendError = 0, HitDataArtMustMatchExtendPathArtError = 110, NoExtendIntersectionsFoundError = 120, ExtendPathEndSegmentsOnlyError = 130,
  ExtendPathIsClosedError = 140, ExtendPathNeedsAtLeast2PointsError = 150, InvalidSourcePathForExtending = 160
}
 Describes various errors that can occur when trimming a path.
 
enum  StrokeAlignment { UnknownStrokeAlignment = 0, CenterStrokeAlignment = 10, InsideStrokeAlignment = 20, OutsideStrokeAlignment = 30 }
 Describes how a path's stroke should be aligned.
 
typedef std::vector< ArtboardSegPointArtboardSegPointVector
 
typedef std::vector< HitData * > HitDataVector
 

Public Member Functions

 ~PathArt ()
 Destructs a PathArt object. More...
 
bool isGuide () const
 Gets whether the path is a guide. More...
 
bool closed () const
 Gets whether the target path is closed. More...
 
void setClosed (const bool closed_)
 Sets whether the target path is closed. More...
 
PathStyle style () const
 Gets the target path's style. More...
 
void setStyle (const PathStyle &style_)
 Sets the target path's style. More...
 
int16_t segCount () const
 Gets the count of segments in the path, taking into account phantom segments of closed paths. More...
 
int16_t segPointCount () const
 Gets the count of individual segment points in the path. More...
 
void setSegCount (const int16_t count_)
 Sets the count of segments in the path. More...
 
void setSegPointCount (const int16_t count_)
 Sets the count of individual segment points in the path. More...
 
std::auto_ptr< hdi::core::Bezierbezier (const int16_t segIndex_) const
 Gets a Bezier object for a given segment index. More...
 
ArtboardPoint midPoint () const
 Gets the midpoint along a path. More...
 
void endPoints (ArtboardPoint &start__, ArtboardPoint &end__) const
 Gets the end points of a path. More...
 
bool hasLength () const
 Gets whether the path has any length. More...
 
double length () const
 Gets the total length of the path. More...
 
double sublength (const int16_t startSegPt_, const int16_t endSegPt_) const
 Gets the length of a subpath from one segment point to another. More...
 
double sublength (const int16_t startSeg_, const double startT_, const int16_t endSeg_, const double endT_) const
 Gets the length of a subpath, from segment point at a t-value to another. More...
 
double tAtLength (const int16_t segNum_, const double length_) const
 Gets the t-value at a given length of a given path segment. More...
 
double area () const
 Gets the area of the path. More...
 
bool hasStraightSegs () const
 Gets whether each individual path segment is straight. More...
 
bool isStraight () const
 Gets whether the entire path forms a perfectly straight line. More...
 
bool isRectangular () const
 Gets whether the entire path forms a rectangular shape. More...
 
bool isCircular () const
 Gets whether the entire path forms a circle. More...
 
bool angle (Angle &angle__) const
 Gets the angle of the path relative to the x-axis, if the path is a perfectly straight line. More...
 
ArtboardSegPointVector segs (const int16_t segIndex_, const int16_t count_) const
 Gets a series of points describing the requested path segments. More...
 
ArtboardSegPointVector segPoints (const int16_t segPtIndex_, const int16_t count_) const
 Gets a series of path segment points. More...
 
ArtboardSegPointVector phantomSeg () const
 Gets two segment points describing the phantom segment of a path. More...
 
ArtboardSegPointVector phantomSegPoints () const
 Gets the two phantom segment points. More...
 
void setSegs (const int16_t segIndex_, const ArtboardSegPointVector &segPts_)
 Sets a series of segments in the path to new values. More...
 
void setSegPoints (const int16_t segPtIndex_, const ArtboardSegPointVector &segPts_)
 Sets a series of segment points in the path to new values. More...
 
bool allSegPointsSelected () const
 Gets whether all the segments points of a path are selected. More...
 
bool segSelected (const int16_t segIndex_) const
 Gets whether a given segment is selected. More...
 
SegPointSelectionState segPointSelected (const int16_t segPtIndex_) const
 Gets the selection state of a given segment point. More...
 
bool setSegPointSelected (const int16_t segPtIndex_, const SegPointSelectionState selected_)
 Sets the selection state of a given segment point. More...
 
void insertSegs (const int16_t segIndex_, const ArtboardSegPointVector &segPts_)
 Inserts new segments into the target path at a given segment index. More...
 
void insertSegPoints (const int16_t segPtIndex_, const ArtboardSegPointVector &segPts_)
 Inserts new segment points into the target path after a given segment point index. More...
 
void deleteSegs (const int16_t segIndex_, const int16_t count_)
 Deletes a given number of segments from a given segment index forward. More...
 
void deleteSegPoints (const int16_t segPtIndex_, const int16_t count_)
 Deletes a given number of segment points from a given segment point index forward. More...
 
void rotateSegPoints (const int16_t delta_)
 Rotates segment point indices by a given delta, while keeping the points at the same location in space. More...
 
void reverseSegs ()
 Reverses the winding order of the segment points in the path. More...
 
WindingOrderType windingOrder () const
 Gets the winding order of the path. More...
 
void setWindingOrder (const WindingOrderType winding_)
 Sets the winding order of the path. More...
 
void setStrokeAlignment (const StrokeAlignment align_)
 Sets the stroke alignment for the target path. More...
 
void insertSegPointAtT (const int16_t segIndex_, const double t_)
 "Safely" inserts a new segment point in a given segment More...
 
int16_t segPointClosestToPoint (const ArtboardPoint &pt_) const
 Gets the index of the segment point that is closest to a given point in space. More...
 
bool containsPoint (const ArtboardPoint &pt_) const
 Gets whether a given point is contained inside the path. More...
 
HitDataVector getIntersections (const bool guides_=false) const
 Gets all path segment intersections along the target path. More...
 
HitDataVector getIntersections (const Art &target_, const bool guides_=false) const
 Gets path segment intersections along the target path. More...
 
TrimError trim (const HitData &center_, const bool delete_, const TrimDirectionType dir_, const bool guides_, Art &split__)
 Trims a path around a given "center" point, either to one or both sides. More...
 
ExtendError extend (const HitData &from_, const HitData &to_, const bool guides_)
 Extends a path from a given "point" to another "point". More...
 

Static Public Attributes

static const int16_t maxSegments = 32000
 Maximum number of segments allowed in a path.
 

Friends

class Art
 

Detailed Description

Allows for path manipulation, metadata access, trimming, extending, etc.

Member Enumeration Documentation

Describes how an individual segment point is selected, if at all.

Note
There are a limited number of ways that a segment point can be selected. Either the point is not selected at all; its anchor, in, and out controls are selected; its in and out controls are selected; its in control is selected; or its out control is selected. Any other combination is not possible.

Constructor & Destructor Documentation

hdi::core::PathArt::~PathArt ( )

Destructs a PathArt object.

Author
GW
Date
08/2013

Member Function Documentation

bool hdi::core::PathArt::allSegPointsSelected ( ) const

Gets whether all the segments points of a path are selected.

Author
GW
Date
08/2013
Returns
true if all the segments points are selected, false otherwise
bool hdi::core::PathArt::angle ( Angle angle__) const

Gets the angle of the path relative to the x-axis, if the path is a perfectly straight line.

Author
GW
Date
08/2013
Parameters
angle__Return-by-reference for the angle of the path
Returns
true if the path is straight and, therefore, the value of angle__ is valid
Note
See isStraight() method.
double hdi::core::PathArt::area ( ) const

Gets the area of the path.

Author
GW
Date
08/2013
Returns
The area formed by the path, in square points
std::auto_ptr<hdi::core::Bezier> hdi::core::PathArt::bezier ( const int16_t  segIndex_) const

Gets a Bezier object for a given segment index.

Author
GW
Date
08/2013
Parameters
segIndex_Segment index number in question
Returns
The Bezier object that describes the path segment (if the seg index is valid), NULL otherwise
bool hdi::core::PathArt::closed ( ) const

Gets whether the target path is closed.

Author
GW
Date
08/2013
Returns
true if the path is closed, false if open
bool hdi::core::PathArt::containsPoint ( const ArtboardPoint pt_) const

Gets whether a given point is contained inside the path.

Author
GW
Date
08/2013
Parameters
pt_The point in question
Returns
true if the given point lies within the path, false otherwise
void hdi::core::PathArt::deleteSegPoints ( const int16_t  segPtIndex_,
const int16_t  count_ 
)

Deletes a given number of segment points from a given segment point index forward.

Author
GW
Date
08/2013
Parameters
segPtIndex_Index number of the first segment point to delete
count_Number of segment points to delete from segIndex_ forward (inclusive)
void hdi::core::PathArt::deleteSegs ( const int16_t  segIndex_,
const int16_t  count_ 
)

Deletes a given number of segments from a given segment index forward.

Author
GW
Date
08/2013
Parameters
segIndex_Index number of the first segment to delete
count_Number of segments to delete from segIndex_ forward (inclusive)
void hdi::core::PathArt::endPoints ( ArtboardPoint start__,
ArtboardPoint end__ 
) const

Gets the end points of a path.

Author
GW
Date
08/2013
Parameters
start__Return-by-reference for the start point (i.e. segment index 0, t-value 0.0)
end__Return-by-reference for the end point (i.e. segment index n-1, t-value 1.0)
Note
This method will also work for closed paths, giving the start and end points around the phantom segment.
ExtendError hdi::core::PathArt::extend ( const HitData from_,
const HitData to_,
const bool  guides_ 
)

Extends a path from a given "point" to another "point".

Author
GW
Date
08/2013
Parameters
from_HitData object describing the point from which the extension should take place
to_HitData object describing the path and segment to which the target should be extended
guides_Whether guides should be included when extending
Returns
An error code for the result of the extend operation. Closed paths cannot be extended, "paths" with only one segment point cannot be extended, only the endpoints of a path can be extended, and a path cannot be extended to another path parallel to it. Successful cases return NoExtendError.
Note
The art that from_ contains must be the same as the art to which the target path belongs.
If some art should not be considered for extending, simply lock or hide it before calling the extend() method.
HitDataVector hdi::core::PathArt::getIntersections ( const bool  guides_ = false) const

Gets all path segment intersections along the target path.

Author
GW
Date
08/2013
Parameters
guides_Whether guides should be included in the search
Returns
A vector of HitData objects describing each intersection point along the target path (including intersections with itself). Inspect each HitData object in the vector for info about which piece of art intersects the target path, and how it intersects the path.
Warning
The caller assumes responsibility for the memory of the contained HitData objects.
HitDataVector hdi::core::PathArt::getIntersections ( const Art target_,
const bool  guides_ = false 
) const

Gets path segment intersections along the target path.

This method only gets intersections between a path and a provided target piece of art

Author
GW
Date
08/2013
Parameters
target_Piece of art to check against for intersections with the target path
guides_Whether guides should be included in the search
Returns
A vector of HitData objects describing each intersection point along the target path. Each intersection, if any, will only contain target_ as the intersecting art. Inspect each HitData object in the vector for info about how it intersects the path.
Warning
The caller assumes responsibility for the memory of the contained HitData objects.
bool hdi::core::PathArt::hasLength ( ) const

Gets whether the path has any length.

Author
GW
Date
08/2013
Returns
true if the path has length, false otherwise
Note
A path might have zero length if it consists of a single point or all the points lie atop one another.
bool hdi::core::PathArt::hasStraightSegs ( ) const

Gets whether each individual path segment is straight.

Author
GW
Date
08/2013
Returns
true if the entire path is composed of straight segments, false otherwise
void hdi::core::PathArt::insertSegPointAtT ( const int16_t  segIndex_,
const double  t_ 
)

"Safely" inserts a new segment point in a given segment

Author
GW
Date
08/2013
Parameters
segIndex_Index number of the segment in which the new point will be added
t_T-value along the given path segment at which the new point will be added
Note
This method is considered "safe" because it keeps the same bezier curvature present at the provided t-value by calculating the proper in- and out-point positions.
void hdi::core::PathArt::insertSegPoints ( const int16_t  segPtIndex_,
const ArtboardSegPointVector &  segPts_ 
)

Inserts new segment points into the target path after a given segment point index.

Author
GW
Date
08/2013
Parameters
segPtIndex_Segment point index, after which the new seg points will be inserted
segPts_Vector of new segment points
Note
For example, passing 0 for segPtIndex_ means that the new seg pts will be inserted between the existing seg pts 0 and 1.
The number of points inserted will be equal to the count of the points in segPts_
If a negative number is passed for segPtIndex_, and the count of segPts_ is equal to its absolute value, these new points will be inserted before the first point in the path.
void hdi::core::PathArt::insertSegs ( const int16_t  segIndex_,
const ArtboardSegPointVector &  segPts_ 
)

Inserts new segments into the target path at a given segment index.

Author
GW
Date
08/2013
Parameters
segIndex_Segment index, in which the new segs will start
segPts_Vector of new segment points describing the segments
Note
For example, passing 0 for segIndex_ means that the new segs will be inserted between the existing seg pts 0 and 1.
The number of segments inserted will be equal to the count of the points in segPts_, minus one (since two points are needed to describe a single segment).
Negative index values, to insert points before the start of the path, can only be passed to the insertSegPoints() method.
bool hdi::core::PathArt::isCircular ( ) const

Gets whether the entire path forms a circle.

Author
GW
Date
08/2013
Returns
true if the path forms a closed circle, false otherwise
bool hdi::core::PathArt::isGuide ( ) const

Gets whether the path is a guide.

Author
GW
Date
08/2013
Returns
true if the path is a guide path, false otherwise
bool hdi::core::PathArt::isRectangular ( ) const

Gets whether the entire path forms a rectangular shape.

Author
GW
Date
08/2013
Returns
true if the path forms an open or closed rectangle (with straight segments)
bool hdi::core::PathArt::isStraight ( ) const

Gets whether the entire path forms a perfectly straight line.

Author
GW
Date
08/2013
Returns
true if the entire path is straight and composes the same angle relative to 0.0°
double hdi::core::PathArt::length ( ) const

Gets the total length of the path.

Author
GW
Date
08/2013
Returns
The length of the path in points
ArtboardPoint hdi::core::PathArt::midPoint ( ) const

Gets the midpoint along a path.

Author
GW
Date
08/2013
Returns
The midpoint of the path (a point equidistant from either end point of the path)
ArtboardSegPointVector hdi::core::PathArt::phantomSeg ( ) const

Gets two segment points describing the phantom segment of a path.

Author
GW
Date
08/2013
Returns
A vector of the two segment points describing the segment
Note
This method is indentical to the phantomSegPoints() method.
ArtboardSegPointVector hdi::core::PathArt::phantomSegPoints ( ) const

Gets the two phantom segment points.

Author
GW
Date
08/2013
Returns
A vector of the two segment points describing the segment
Note
This method is indentical to the phantomSeg() method.
void hdi::core::PathArt::reverseSegs ( )

Reverses the winding order of the segment points in the path.

Author
GW
Date
08/2013
void hdi::core::PathArt::rotateSegPoints ( const int16_t  delta_)

Rotates segment point indices by a given delta, while keeping the points at the same location in space.

Author
GW
Date
08/2013
Parameters
delta_The number of positions to move each segment point
Note
The rotation changes the segment point index by the given delta; e.g. if a path had point indices and locations 0:(0,1), 1:(2,3), 2:(4,5) and delta_ was 1, the points would shift to become 0:(2,3), 1:(4,5), 2:(0,1) instead.
int16_t hdi::core::PathArt::segCount ( ) const

Gets the count of segments in the path, taking into account phantom segments of closed paths.

Author
GW
Date
08/2013
Returns
The count of segments in the path
int16_t hdi::core::PathArt::segPointClosestToPoint ( const ArtboardPoint pt_) const

Gets the index of the segment point that is closest to a given point in space.

Author
GW
Date
08/2013
Parameters
pt_The point in question
Returns
The segment point index closest to the provided point, or -1 for error
int16_t hdi::core::PathArt::segPointCount ( ) const

Gets the count of individual segment points in the path.

Author
GW
Date
08/2013
Returns
The count of segment points in the path
ArtboardSegPointVector hdi::core::PathArt::segPoints ( const int16_t  segPtIndex_,
const int16_t  count_ 
) const

Gets a series of path segment points.

Author
GW
Date
08/2013
Parameters
segPtIndex_Index number of the first segment point in question
count_Number of segment points requested from segIndex_ forward (inclusive)
Returns
A vector of segment points describing the segments in question
Note
The maximum value for count_ is equal to maxSegments
SegPointSelectionState hdi::core::PathArt::segPointSelected ( const int16_t  segPtIndex_) const

Gets the selection state of a given segment point.

Author
GW
Date
08/2013
Parameters
segPtIndex_Index number of the segment point in question
Returns
A segment point selection state enum value to describe how the point is selected
Note
It is worth noting that a segment point being selected individually by the direct selection tool will result in all control points being selected (and visibly so on the artboard), but a path's segment points being selected en masse by the regular selection tool will result in the Illustrator SDK saying that all control points are selected too (though only the anchor point will be visibly selected on the artboard). It is not possible to determine with the SDK whether a given segment point was selected by one tool or another, nor is it possible to determine that only the anchor point is visibly shown to be selected (and not the other two control points). As such, if you need to make a distinction between these two situations, it is best to make an initial pass through all of the segment points of a path and count how many appear to have all of their control points selected. If it is exactly one, then that individual segment point will indeed visibly show all of its control points as being selected. If the count is not one, then all of the "fully selected" control points will only visibly show their anchor point as being selected.
ArtboardSegPointVector hdi::core::PathArt::segs ( const int16_t  segIndex_,
const int16_t  count_ 
) const

Gets a series of points describing the requested path segments.

Author
GW
Date
08/2013
Parameters
segIndex_Index number of the first segment in question
count_Number of segments requested from segIndex_ forward (inclusive)
Returns
A vector of segment points describing the segments in question
Note
The count of the resultant points in the vector will typically be equal to count_ + 1 (since two points are needed to describe a single segment). This will be overridden in the case of a requested count that is larger than the path's segment count, or the path being closed (the phantom segment is at the "end" and wraps around).
You can acquire the phantom segment of a path (closed or open) by passing in -1 (or segPtCount() - 1) for segIndex_ and 1 for count_
The maximum value for count_ is equal to maxSegments
bool hdi::core::PathArt::segSelected ( const int16_t  segIndex_) const

Gets whether a given segment is selected.

Author
GW
Date
08/2013
Parameters
segIndex_Index number of the segment in question
Returns
true if the segment is selected, false otherwise
Note
A segment is selected if both its endpoints are fully selected
void hdi::core::PathArt::setClosed ( const bool  closed_)

Sets whether the target path is closed.

Author
GW
Date
08/2013
Parameters
closed_true to close the path, false to open it
void hdi::core::PathArt::setSegCount ( const int16_t  count_)

Sets the count of segments in the path.

Author
GW
Date
08/2013
Parameters
count_New segment count
Precondition
Path closedness/openness must already be set to the desired value, otherwise unexpected results may occur. If the closed/open state of a (new) path is not yet determinable, use the setSegPointCount() method instead.
Note
For new path art, this method should be called before any segment point manipulation method, e.g. setSegs() or setSegPoints(), as it "primes" the path to have the requisite number of segments available for said manipulation.
For new path art, if this method is called and then e.g. setSegs() is never called, then all the segment points will simply lie at (0,0).
void hdi::core::PathArt::setSegPointCount ( const int16_t  count_)

Sets the count of individual segment points in the path.

Author
GW
Date
08/2013
Parameters
count_New segment point count
Note
For new path art, this method should be called before any segment point manipulation method, e.g. setSegs() or setSegPoints(), as it "primes" the path to have the requisite number of segment points available for said manipulation.
For new path art, if this method is called and then e.g. setSegPoints() is never called, then all the segment points will simply lie at (0,0).
void hdi::core::PathArt::setSegPoints ( const int16_t  segPtIndex_,
const ArtboardSegPointVector &  segPts_ 
)

Sets a series of segment points in the path to new values.

Author
GW
Date
08/2013
Parameters
segPtIndex_Index number of the first segment point to set
segPts_Vector of new segment points
Note
This method will either change existing segment points, or create new ones if they don't exist yet.
The number of points modified will be equal to the count of the points in segPts_
The maximum count for segPts_ is equal to maxSegments
bool hdi::core::PathArt::setSegPointSelected ( const int16_t  segPtIndex_,
const SegPointSelectionState  selected_ 
)

Sets the selection state of a given segment point.

Author
GW
Date
03/2015
Parameters
segPtIndex_Index number of the segment point in question
selected_New segment point selection state enum value
Returns
true if the point was selected as indicated, false otherwise (see the documentation for the SegPointSelectionState enum for why this might occur)
void hdi::core::PathArt::setSegs ( const int16_t  segIndex_,
const ArtboardSegPointVector &  segPts_ 
)

Sets a series of segments in the path to new values.

Author
GW
Date
08/2013
Parameters
segIndex_Index number of the first segment to set
segPts_Vector of new segment points describing the segments
Precondition
Path closedness/openness must already be set to the desired value, otherwise unexpected results may occur. If the closed/open state of a (new) path is not yet determinable, use the setSegPoints() method instead.
Note
This method will either change existing segments, or create new ones if they don't exist yet.
The number of segments modified will be equal to the count of the points in segPts_ for closed paths, or the count minus one for open paths (since two points are needed to describe a single segment).
The maximum count for segPts_ is equal to maxSegments
void hdi::core::PathArt::setStrokeAlignment ( const StrokeAlignment  align_)

Sets the stroke alignment for the target path.

Author
GW
Date
08/2014
Parameters
align_New stroke alignment setting
Note
As of Illustrator 21, there is no getter for stroke alignment.
void hdi::core::PathArt::setStyle ( const PathStyle style_)

Sets the target path's style.

Author
GW
Date
08/2013
Parameters
style_New path styling info
void hdi::core::PathArt::setWindingOrder ( const WindingOrderType  winding_)

Sets the winding order of the path.

Author
GW
Date
08/2013
Parameters
winding_New path winding order
Note
If a specific winding order is desired, this method offers more control than the reverseSegs() method. For example, if a path is already clockwise, setting it to clockwise has no effect. If a path is counter-clockwise, setting it to clockwise will switch the winding order.
PathStyle hdi::core::PathArt::style ( ) const

Gets the target path's style.

Author
GW
Date
08/2013
Returns
An PathStyle object describing the path's styling info
double hdi::core::PathArt::sublength ( const int16_t  startSegPt_,
const int16_t  endSegPt_ 
) const

Gets the length of a subpath from one segment point to another.

Author
GW
Date
08/2013
Parameters
startSegPt_Starting segment point number for calculating path length
endSegPt_Ending segment point number for calculating path length
Returns
The length in points of the subpath from startSegPt_ to endSegPt_
double hdi::core::PathArt::sublength ( const int16_t  startSeg_,
const double  startT_,
const int16_t  endSeg_,
const double  endT_ 
) const

Gets the length of a subpath, from segment point at a t-value to another.

Author
GW
Date
08/2013
Parameters
startSeg_Starting segment point number for calculating path length
startT_T-value along startSeg_ seg to begin the calculation
endSeg_Ending segment point number for calculating path length
endT_T-value along endSeg_ seg to end the calculation
Returns
The length in points of the subpath from startSeg_ at startT_ to endSeg_ at endT_
double hdi::core::PathArt::tAtLength ( const int16_t  segNum_,
const double  length_ 
) const

Gets the t-value at a given length of a given path segment.

Author
GW
Date
08/2013
Parameters
segNum_Segment number in which the given sublength resides
length_Length within the given segment number for which a t-value is desired
Returns
The bezier t-value in the given segment at which the given length is reached
TrimError hdi::core::PathArt::trim ( const HitData center_,
const bool  delete_,
const TrimDirectionType  dir_,
const bool  guides_,
Art split__ 
)

Trims a path around a given "center" point, either to one or both sides.

Author
GW
Date
08/2013
Parameters
center_HitData object describing the "center" from which the trims will take place
delete_Whether portion(s) of the path beyond the intersection(s) should be deleted
dir_Which direction the trim(s) should take place
guides_Whether guides should be taken into account for trimming
split__Return-by-reference for the second piece of path art, if necessary
Returns
An error code for the result of the trim operation. Closed paths cannot be trimmed, and "paths" with only one segment point cannot be trimmed. Successful cases return NoTrimError.
Note
Intersection(s) nearest center_, on the path, will be trimmed. The art that center_ contains must be the same as the art to which the target path belongs.
Pass true for delete_ to remove portions of the path beyond the intersection(s), or false to insert new segment points where the deletion would have otherwise occurred.
The dir_ arg can be used to perform a trim on only one side of a line, regardless of intersections existing on the other side.
split__ will be set to the secondary piece of path art after a trim that results in the path being split (i.e. deleting pts in the middle). It will first be set to an empty Art object by default.
If some art should not be considered for trimming, simply lock or hide it before calling the trim() method.
WindingOrderType hdi::core::PathArt::windingOrder ( ) const

Gets the winding order of the path.

Author
GW
Date
08/2013
Returns
An enum value for clockwise or counter-clockwise winding order