jitx/shapes/GeneralRoundedRectangle¶
Package name: jitx/shapes/GeneralRoundedRectangle
Summary¶
GeneralRoundedRectangle¶
General Rounded Rectangle
Constructors¶
Function | Description |
---|---|
GeneralRoundedRectangle | Constructor for defstruct GeneralRoundedRectangle |
Functions¶
Function | Description |
---|---|
GeneralRoundedRectangle (+ 2) | Create a general rounded rectangle using a CornerModifier to specify which corners are rounded. |
Definitions¶
GeneralRoundedRectangle¶
General Rounded Rectangle
public defstruct GeneralRoundedRectangle <: Shape & HasMetaUtils :
height: Double
pose: Pose
radii: Tuple<Double>
width: Double
-
height: Double
- Height of this general rounded rectangle. Must be non-negative. -
pose: Pose
- Pose of this rounded rectangle. Default value is(0.0, 0.0)
with no rotation and no flip. -
radii: Tuple<Double>
- Tuple of the four radii of each of the rounded corners of this general rounded rectangle, in counter-clockwise order starting from the bottom left. Must all be non-negative. The sum of the radii of the two corners on each side must not exceed the length of the side. -
width: Double
- Width of this general rounded rectangle. Must be non-negative.
A rectangle with rounded (filleted) corners of different radii.
Specified with a width, height, a tuple of four corner radii, and a pose. The
pose center is the center of the rectangle. The tuple of radii is ordered
starting with the bottom-left corner going counter-clockwise. A corner radius of
0.0
indicates no rounding. The flip of the pose affects the ordering of the
general rounded rectangle's points when converted to a polygon (clockwise when
flipped, otherwise counter-clockwise).
Constructors¶
GeneralRoundedRectangle¶
Constructor for defstruct GeneralRoundedRectangle
public defn GeneralRoundedRectangle (width:Double, height:Double, radii:Tuple<Double>, pose:Pose = ?)
Functions¶
GeneralRoundedRectangle¶
Create a general rounded rectangle using a CornerModifier
to specify which corners are rounded.
public defn GeneralRoundedRectangle (w:Double, h:Double, r:Double, m:CornerModifier, p:Pose = ?)
w: Double
- Width of the general rounded rectangle.h: Double
- Height of the general rounded rectangle.r: Double
- Corner radius of the general rounded rectangle.m: CornerModifier
- Which corners to make rounded of the general rounded rectangle.p: Pose
- Pose of the general rounded rectangle. Default is(0.0, 0.0)
with no rotation and no flip.
GeneralRoundedRectangle¶
Create a general rounded rectangle anchored to a specified alignment with respect to the origin and using a CornerModifier
to specify which corners are rounded.
public defn GeneralRoundedRectangle (anchor:Anchor, w:Double, h:Double, r:Double, m:CornerModifier)
anchor: Anchor
- Anchor to align the general rounded rectangle with to the origin.w: Double
- Width of the general rounded rectangle.h: Double
- Height of the general rounded rectangle.r: Double
- Corner radius of the general rounded rectangle.m: CornerModifier
- Which corners to make rounded of the general rounded rectangle.
GeneralRoundedRectangle¶
Create a general rounded rectangle anchored to a specified alignment with respect to the origin.
public defn GeneralRoundedRectangle (anchor:Anchor, w:Double, h:Double, r:Tuple<Double>)
anchor: Anchor
- Anchor to align the general rounded rectangle with to the origin.w: Double
- Width of the general rounded rectangle.h: Double
- Height of the general rounded rectangle.r: Tuple<Double>
- Tuple of four radii of the corners of the general rounded rectangle, starting from the bottom-left going counter-clockwise.
Related Packages¶
Forwarded by packages: jitx/shapes, jitx