PathSegment
Kind: class
Module/package: models
SDK: pdfdancer-client-python 2.0.0
Base class for vector path segments.
Parameters:
- stroke_color: Outline color for the segment (
Color). - fill_color: Fill color for closed shapes when applicable (
Color). - stroke_width: Line width in points.
- dash_array: Dash pattern (e.g.
[3, 2]for 3 on, 2 off). None or empty for solid. - dash_phase: Offset into the dash pattern.
Notes:
- Concrete subclasses are
LineandBezier. - Used inside
Path.path_segmentsand serialized byAddRequest.
Declaration
PathSegment(stroke_color: pdfdancer.models.Color | None = None, fill_color: pdfdancer.models.Color | None = None, stroke_width: float | None = None, dash_array: List[float] | None = None, dash_phase: float | None = None) -> None
Members
__init__
__init__(self, stroke_color: pdfdancer.models.Color | None = None, fill_color: pdfdancer.models.Color | None = None, stroke_width: float | None = None, dash_array: List[float] | None = None, dash_phase: float | None = None) -> None
Initialize self. See help(type(self)) for accurate signature.
get_dash_array
get_dash_array(self) -> List[float] | None
Dash pattern for stroking the path segment. Null or empty means solid line.
get_dash_phase
get_dash_phase(self) -> float | None
Dash phase (offset) into the dash pattern in user space units.
get_fill_color
get_fill_color(self) -> pdfdancer.models.Color | None
Color used for filling the segment's interior area (if applicable).
get_stroke_color
get_stroke_color(self) -> pdfdancer.models.Color | None
Color used for drawing the segment's outline or stroke.
get_stroke_width
get_stroke_width(self) -> float | None
Width of the stroke line in PDF coordinate units.