mini_arcade_core.spaces.geometry.shapes ======================================= .. py:module:: mini_arcade_core.spaces.geometry.shapes .. autoapi-nested-parse:: Geometry shape definitions. Attributes ---------- .. autoapisummary:: mini_arcade_core.spaces.geometry.shapes.ShapeKind Classes ------- .. autoapisummary:: mini_arcade_core.spaces.geometry.shapes.Shape2D mini_arcade_core.spaces.geometry.shapes.Rect mini_arcade_core.spaces.geometry.shapes.Circle mini_arcade_core.spaces.geometry.shapes.Triangle mini_arcade_core.spaces.geometry.shapes.Line mini_arcade_core.spaces.geometry.shapes.Poly Module Contents --------------- .. py:data:: ShapeKind .. py:class:: Shape2D Simple shape entity. :ivar kind: The kind of shape (rect, circle, triangle, line, poly). .. py:attribute:: kind :type: ShapeKind .. py:class:: Rect Bases: :py:obj:`Shape2D` Rectangle shape entity. :ivar kind: The kind of shape (rect). :ivar corner_radius: The corner radius of the rectangle. .. py:attribute:: kind :type: Literal['rect'] :value: 'rect' .. py:attribute:: corner_radius :type: float :value: 0.0 .. py:class:: Circle Bases: :py:obj:`Shape2D` Circle shape entity. :ivar kind: The kind of shape (circle). :ivar radius: The radius of the circle. .. py:attribute:: kind :type: Literal['circle'] :value: 'circle' .. py:attribute:: radius :type: float :value: 0.0 .. py:class:: Triangle Bases: :py:obj:`Shape2D` Triangle shape entity. :ivar kind: The kind of shape (triangle). .. py:attribute:: kind :type: Literal['triangle'] :value: 'triangle' .. py:class:: Line Bases: :py:obj:`Shape2D` Line shape entity. :ivar kind: The kind of shape (line). :ivar a: The start point of the line (local-space). :ivar b: The end point of the line (local-space). :ivar dash_length: Optional dash length in pixels for dashed rendering. :ivar dash_gap: Optional gap length in pixels for dashed rendering. .. py:attribute:: kind :type: Literal['line'] :value: 'line' .. py:attribute:: a :type: mini_arcade_core.spaces.math.vec2.Vec2 .. py:attribute:: b :type: mini_arcade_core.spaces.math.vec2.Vec2 .. py:attribute:: dash_length :type: float | None :value: None .. py:attribute:: dash_gap :type: float | None :value: None .. py:class:: Poly Bases: :py:obj:`Shape2D` Polygon shape entity. :ivar kind: The kind of shape (poly). :ivar points: The points of the polygon (local-space). .. py:attribute:: kind :type: Literal['poly'] :value: 'poly' .. py:attribute:: points :type: list[mini_arcade_core.spaces.math.vec2.Vec2] | None :value: None