S or /

SourceClass Stroke

from egui import Stroke
class Stroke:

Describes the width and color of a line.

The default stroke is the same as Stroke.NONE.

Properties§

@property def color(self, /) -> Color32§
@color.setter def color(self, /, color: Color32) -> None§
@property def width(self, /) -> float§
@width.setter def width(self, /, width: float) -> None§

Methods§

Sourcedef is_empty(self, /) -> bool§

True if width is zero or color is transparent

@staticmethod def none() -> Stroke§
Sourcedef round_center_to_pixel(self, /, pixels_per_point: float, coord: float) -> float§

For vertical or horizontal lines: round the stroke center to produce a sharp, pixel-aligned line.