xnano.core.stage
xnano.core.stage
¶
xnano.core.stage
Expose field layout areas and targeted cell painting for the current frame.
Classes:
-
Stage–Store named layout areas and frame-local paint requests.
Stage
dataclass
¶
Store named layout areas and frame-local paint requests.
Example
stage.paint_cell(2, 1, "!", foreground="yellow")
Attributes:
Methods:
-
get_area–Return the area registered for a name.
-
paint_cell–Queue one styled cell write for the current frame.
areas
class-attribute
instance-attribute
¶
Areas keyed by field or effect name.
get_area
¶
paint_cell
¶
paint_cell(
x: int,
y: int,
value: str,
*,
foreground: ColorLike | None = None,
background: ColorLike | None = None,
modifiers: Sequence[CharacterModifier] | None = None,
color: ColorLike | None = None
) -> None
Queue one styled cell write for the current frame.
Parameters:
-
x(int) –Cell column.
-
y(int) –Cell row.
-
value(str) –Character or grapheme to paint.
-
foreground(ColorLike | None, default:None) –Foreground color.
-
background(ColorLike | None, default:None) –Background color.
-
modifiers(Sequence[CharacterModifier] | None, default:None) –Character modifiers.
-
color(ColorLike | None, default:None) –Deprecated alias for
foreground.