PathState

State for SVG path rendering and morphing

Constructor

PathState(
    pos: Point2D | None = None,
    scale: float | None = None,
    opacity: float = 1.0,
    rotation: float | None = None,
    skew_x: float | None = None,
    skew_y: float | None = None,
    z_index: float = 0.0,
    clip_state: State | None = None,
    mask_state: State | None = None,
    clip_states: list[State] | None = None,
    mask_states: list[State] | None = None,
    filter: Filter | None = None,
    NON_INTERPOLATABLE_FIELDS: frozenset[str] = frozenset({'NON_INTERPOLATABLE_FIELDS'}),
    fill_color: Color | None = Color.NONE,
    fill_opacity: float = 1,
    fill_gradient: Gradient | None = None,
    fill_pattern: Pattern | None = None,
    stroke_color: Color | None = Color.NONE,
    stroke_opacity: float = 1,
    stroke_width: float = 1,
    stroke_gradient: Gradient | None = None,
    stroke_pattern: Pattern | None = None,
    non_scaling_stroke: bool = False,
    data: str | SVGPath = 'M 0,0 L 10,10 L 0,20 Z',
    stroke_linecap: StrokeLinecap | str = <StrokeLinecap.BUTT: 'butt'>,
    stroke_linejoin: StrokeLinejoin | str = <StrokeLinejoin.MITER: 'miter'>,
    stroke_dasharray: str | None = None,
    fill_rule: str | FillRule = <FillRule.EVENODD: 'evenodd'>,
    draw_progress: float = 1.0,
    draw_commands: float = 1.0,
    morph_method: MorphMethod | str | None = None
) -> None

Methods

get_renderer_class

get_renderer_class()

Get the renderer class for this state.

Returns

The renderer class for this state, or None if not registered

get_vertex_renderer_class

get_vertex_renderer_class()

Get the vertex renderer class for morphing transitions.

is_angle

is_angle(field: Field) -> bool

need_morph

need_morph(state)

with_x

with_x(x: float) -> State

with_y

with_y(y: float) -> State

Properties

x
y