Enum egui::Shape [−][src]
pub enum Shape { Noop, Vec(Vec<Shape, Global>), Circle { center: Pos2, radius: f32, fill: Color32, stroke: Stroke, }, LineSegment { points: [Pos2; 2], stroke: Stroke, }, Path { points: Vec<Pos2, Global>, closed: bool, fill: Color32, stroke: Stroke, }, Rect { rect: Rect, corner_radius: f32, fill: Color32, stroke: Stroke, }, Text { pos: Pos2, galley: Arc<Galley>, color: Color32, fake_italics: bool, }, Mesh(Mesh), }
Expand description
A paint primitive such as a circle or a piece of text. Coordinates are all screen space points (not physical pixels).
Variants
Paint nothing. This can be useful as a placeholder.
Recursively nest more shapes - sometimes a convenience to be able to do. For performance reasons it is better to avoid it.
Show fields
Show fields
Show fields
Mesh(Mesh)
Implementations
A line between two points.
More efficient than calling Self::line
.
A line through many points.
Use Self::line_segment
instead if your line only connect two points.
A line that closes back to the start point again.
A convex polygon with a fill and optional stroke.
pub fn polygon(
points: Vec<Pos2, Global>,
fill: impl Into<Color32>,
stroke: impl Into<Stroke>
) -> Shape
👎 Deprecated:
Renamed convex_polygon
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl UnwindSafe for Shape
Blanket Implementations
Mutably borrows from an owned value. Read more