geometry

class janim.items.geometry.__init__.GeometryShape(*args, **kwargs)

Bases: VItem

Base class for geometry items

Provides the general reshape() method and related helper functions

Specifically:

  • _reshape is used for the lowest-level geometry item implementation

  • reshape is intended to be overridden by subclasses, and can be used to change top-level external behavior

    (For example, Polygon is built with verts and close_path by default, while RegularPolygon overrides reshape to build from n, radius, and start_angle)

If you need to retrieve remembered parameter values separately, such as Star’s start_angle, you can directly use forms like .reshape_params['start_angle']

reshape() Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

copy(*, root_only: bool = False) Self

Copy item

become(other: GeometryShape, *, auto_visible: bool = True) Self

Set this item’s data to match the passed item (by copying, not by reference)