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
Noop
Paint nothing. This can be useful as a placeholder.
Vec(Vec<Shape, Global>)
Recursively nest more shapes - sometimes a convenience to be able to do. For performance reasons it is better to avoid it.
Circle
LineSegment
Path
Fields
closed: boolIf true, connect the first and last of the points together.
This is required if fill != TRANSPARENT.
fill: Color32Fill is only supported for convex polygons.
stroke: StrokeRect
Fields
rect: Rectcorner_radius: f32How rounded the corners are. Use 0.0 for no rounding.
fill: Color32stroke: StrokeText
Fields
pos: Pos2Top left corner of the first character..
color: Color32Text color (foreground).
fake_italics: boolIf true, tilt the letters for a hacky italics effect.
Mesh(Mesh)
Tuple Fields
0: MeshImplementations
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
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
