Bezier
Kind: class
Module/package: models
SDK: pdfdancer-client-python 2.0.0
Cubic Bezier curve segment defined by 4 points.
Parameters:
- p0: Start point.
- p1: First control point.
- p2: Second control point.
- p3: End point.
Example:
curve = Bezier(
p0=Point(10, 10), p1=Point(50, 80), p2=Point(80, 50), p3=Point(120, 10)
)
Declaration
Bezier(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, p0: pdfdancer.models.Point | None = None, p1: pdfdancer.models.Point | None = None, p2: pdfdancer.models.Point | None = None, p3: pdfdancer.models.Point | 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, p0: pdfdancer.models.Point | None = None, p1: pdfdancer.models.Point | None = None, p2: pdfdancer.models.Point | None = None, p3: pdfdancer.models.Point | 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_p0
get_p0(self) -> pdfdancer.models.Point | None
Returns the starting point p0 of this Bezier segment.
get_p1
get_p1(self) -> pdfdancer.models.Point | None
Returns the first control point p1 of this Bezier segment.
get_p2
get_p2(self) -> pdfdancer.models.Point | None
Returns the second control point p2 of this Bezier segment.
get_p3
get_p3(self) -> pdfdancer.models.Point | None
Returns the ending point p3 of this Bezier segment.
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.