SourceClass TextShape
from egui import TextShapeclass TextShape:How to paint some text on screen.
This needs to be recreated if pixels_per_point (dpi scale) changes.
Properties§
@property
def angle(self, /) -> float§
@angle.setter
def angle(self, /, angle: float) -> None§
@property
def fallback_color(self, /) -> Color32§
@fallback_color.setter
def fallback_color(self, /, fallback_color: Color32) -> None§
@property
def galley(self, /) -> Galley§
@galley.setter
def galley(self, /, galley: Galley) -> None§
@property
def opacity_factor(self, /) -> float§
@opacity_factor.setter
def opacity_factor(self, /, opacity_factor: float) -> None§
@property
def override_text_color(self, /) -> Color32 |None§
@override_text_color.setter
def override_text_color(self, /, override_text_color: Color32 |None) -> None§
@property
def pos(self, /) -> Pos2§
@pos.setter
def pos(self, /, pos: Pos2) -> None§
@property
def underline(self, /) -> Stroke§
@underline.setter
def underline(self, /, underline: Stroke) -> None§
Methods§
Sourcedef transform(self, /, transform: TSTransform) -> None§
Move the shape by this many points, in-place.
Sourcedef visual_bounding_rect(self, /) -> Rect§
The visual bounding rectangle
Sourcedef with_angle(self, /, angle: float) -> TextShape§
Set text rotation to angle radians clockwise.
The pivot is pos (the upper left corner of the text).
Sourcedef with_angle_and_anchor(self, /, angle: float, anchor: Align2) -> TextShape§
Set the text rotation to the angle radians clockwise.
The pivot is determined by the given anchor point on the text bounding box.
Sourcedef with_opacity_factor(self, /, opacity_factor: float) -> TextShape§
Render text with this opacity in gamma space
Sourcedef with_override_text_color(self, /, override_text_color: Color32) -> TextShape§
Use the given color for the text, regardless of what color is already in the galley.