Path
Kind: class
Module/package: com.pdfdancer.common.model.path
SDK: com.pdfdancer.client:pdfdancer-client-java 2.0.0
Represents a complex vector path consisting of multiple path segments. This class encapsulates vector graphics data within PDF documents, composed of various path elements like lines, curves, and shapes. Provides automatic getPosition calculation based on constituent segments.
Declaration
public class com.pdfdancer.common.model.path.Path extends com.pdfdancer.common.model.PDFObject
Members
constructor
public com.pdfdancer.common.model.path.Path()
addPathSegment
public void addPathSegment(com.pdfdancer.common.model.path.PathSegment)
Adds a new path segment to this path. Segments are added in sequence and contribute to the overall path shape.
getEvenOddFill
public java.lang.Boolean getEvenOddFill()
Returns whether even-odd fill rule should be used (true) or nonzero (false). Null means default (nonzero).
getPathSegments
public java.util.List<com.pdfdancer.common.model.path.PathSegment> getPathSegments()
Returns the list of path segments that compose this path.
getPosition
public com.pdfdancer.common.model.Position getPosition()
Calculates the getPosition of this path based on its constituent segments. This method determines the path's getPosition by finding the leftmost X coordinate and topmost Y coordinate from all path segments, representing the path's origin.
setEvenOddFill
public void setEvenOddFill(java.lang.Boolean)
Sets the fill rule for this path. If true, uses even-odd; if false, nonzero; if null, defaults to nonzero.
setPathSegments
public void setPathSegments(java.util.List<com.pdfdancer.common.model.path.PathSegment>)
Sets the path segments for this path. Used for deserialization.
setPosition
public void setPosition(com.pdfdancer.common.model.Position)
Position setting is not supported for complex paths. Path getPosition is automatically calculated from constituent segments.