SourceClass PathShape
from egui import PathShapeclass PathShape:A path which can be stroked and/or filled (if closed).
Properties§
@property
def closed(self, /) -> bool§
@closed.setter
def closed(self, /, closed: bool) -> None§
@property
def fill(self, /) -> Color32§
@fill.setter
def fill(self, /, fill: Color32) -> None§
@property
def stroke(self, /) -> PathStroke§
@stroke.setter
def stroke(self, /, stroke: Any) -> None§
Methods§
Source@staticmethod
def closed_line(points: Sequence[Pos2], stroke: Any) -> PathShape§
A line that closes back to the start point again.
Source@staticmethod
def convex_polygon(points: Sequence[Pos2], fill: Color32, stroke: Any) -> PathShape§
A convex polygon with a fill and optional stroke.
The most performant winding order is clockwise.
Source@staticmethod
def line(points: Sequence[Pos2], stroke: Any) -> PathShape§
A line through many points.
Use Shape.line_segment instead if your line only connects two points.
def points(self, /) -> list[Pos2]§
def set_points(self, /, points: Sequence[Pos2]) -> None§
Sourcedef visual_bounding_rect(self, /) -> Rect§
The visual bounding rectangle (includes stroke width)