Rectangle¶
-
class img_gen.Rectangle(color: ColorKind, radius: float =
0, corners: list[Corners] | None =None, border: Border | None =None)¶ –
An attribute to represent a rectangle rendered in the layer.
The size of the rectangle is specified by the layer’s size.
- color¶
The color used to fill the rectangle.
- corners¶
A list of the [
Corners] in which theradiusis applied.Any [
Corners] not in this list will not be rounded.
- radius¶
The radius of the rendered [
Rectangle::corners].The renderer shall limit this value if it is greater than half the minimum of the rectangle’s width or height (see [
Layer::size](value@crate::Layer::size)).
- class img_gen.Corners¶
An enum to represent the possible options in specifying which [
Rectangle::corners] to render rounded.-
TopLeft =
Corners.TopLeft¶
-
TopRight =
Corners.TopRight¶
-
BottomLeft =
Corners.BottomLeft¶
-
BottomRight =
Corners.BottomRight¶
- static all()¶
Returns a list of all corner enum values.
-
TopLeft =