PointState

A degenerate state representing a single point

Used to explicitly control where shapes disappear to or appear from during M→N morphing transitions. Unlike implicit zero-states, PointState gives users full control over: - Exact disappearance location (x, y) - Opacity behavior during transition - Visual representation (nothing rendered at t=1.0) During morphing, shapes smoothly collapse to (or expand from) the point location. The opacity can be set to 0.0 for fade-out effects, or 1.0 to maintain visibility until the final moment.

Constructor

PointState(
    pos: Optional[Point2D] = None,
    scale: Optional[float] = None,
    opacity: Optional[float] = None,
    rotation: Optional[float] = None,
    skew_x: Optional[float] = None,
    skew_y: Optional[float] = None,
    clip_state: Optional[State] = None,
    mask_state: Optional[State] = None,
    clip_states: Optional[List[State]] = None,
    mask_states: Optional[List[State]] = None,
    filter: Optional[Filter] = None,
    NON_INTERPOLATABLE_FIELDS: frozenset[str] = frozenset({'DEFAULT_EASING', 'NON_INTERPOLATABLE_FIELDS'}),
    fill_color: Optional[Color] = Color.NONE,
    fill_opacity: float = 1,
    fill_gradient: Optional[Gradient] = None,
    fill_pattern: Optional[Pattern] = None,
    stroke_color: Optional[Color] = Color.NONE,
    stroke_opacity: float = 1,
    stroke_width: float = 1,
    stroke_gradient: Optional[Gradient] = None,
    stroke_pattern: Optional[Pattern] = None,
    closed: bool = True,
    _num_vertices: Optional[int] = None,
    _aligned_contours: Optional[VertexContours] = None,
    num_vertices: int = 128
) -> None

Methods

get_contours

get_contours()

Get contours for this shape

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 renderer for morphing transitions (0 < t < 1)

Returns

VertexRenderer class for morphing

get_vertices

get_vertices()

Get outer contour vertices (backwards compatibility)

is_angle

is_angle(field: field)

need_morph

need_morph(state)

with_x

with_x(x: float) -> State

with_y

with_y(y: float) -> State

Properties

x
y