Layout¶
- class img_gen.Layout(size: Size | None = None, layers: list[Layer] = [], debug: Optional[Debug])¶
–
A data structure used to represent a generated image’s layout.
-
class img_gen.Size(width: int =
None, height: int =None)¶ –
A layer attribute to describe the layer’s size.
- height¶
The current height.
- width¶
The current width.
-
class img_gen.Debug(enable: bool =
False, grid: bool =True, grid_step: int =16, color: Color | None =None)¶ –
A struct to describe a [
Layout]’s visual debug output.- color¶
The color used to outline debug output.
- enable¶
A flag to enable or disable the debug output.
- get_foreground_color() SolidColor¶
–
Calculate a black or white foreground color using
Debug.coloras a background.
- grid¶
A flag to control if the debug output shall show a grid of points over the layout.
- grid_step¶
The space between points on the debug output’s grid.