jitx/shapes/Shape¶
Package name: jitx/shapes/Shape
Summary¶
Data Types¶
Shape¶
Shape
Multis¶
Function | Description |
---|---|
area | Return the area of the shape. |
upper-extend | |
lower-extend |
CornerModifier¶
Enum for general rounded rectangle corner combinations
EmptyShape¶
Empty Shape
Constructors¶
Function | Description |
---|---|
EmptyShape | Constructor for defstruct EmptyShape |
Definitions¶
Shape¶
Shape
public deftype Shape <: Equalable & Hashable & HasMetaUtils
Generic type which all shapes are a subtype of. Every shape has an area which can be calculated by calling area
on the shape.
Multis¶
area¶
Return the area of the shape.
public defmulti area (sh:Shape) -> Double
- Returns
Double
upper-extend¶
public defmulti upper-extend (sh:Shape) -> Double
- Returns
Double
lower-extend¶
public defmulti lower-extend (sh:Shape) -> Double
- Returns
Double
CornerModifier¶
Enum for general rounded rectangle corner combinations
public defenum CornerModifier <: Equalable & Hashable
-
CornerModifierNone
- represents no corners -
CornerModifierAll
- represents all corners -
CornerModifierBottomLeft
-
CornerModifierBottomRight
-
CornerModifierUpperLeft
-
CornerModifierUpperRight
-
CornerModifierUpperLeftAndRight
- upper left and upper right corners -
CornerModifierBottomLeftAndRight
- bottom left and bottom right corners -
CornerModifierUpperAndBottomLeft
- upper left and bottom left corners -
CornerModifierUpperAndBottomRight
- upper right and bottom right corners
This definition defines 10 options of combinations of zero or more corners of a rectangle. Used for specifying which corners to apply an operation to, for example when specifying which corners are rounded when constructing a general rounded rectangle. The options include no corners, all corners, each individual corner, and pairs of corners on each side of the rectangle.
EmptyShape¶
Empty Shape
public defstruct EmptyShape <: Shape & HasMetaUtils :
An empty shape. Empty shapes have zero area and no pose.
Related Packages¶
Forwarded by packages: jitx/shapes, jitx