Enum dotrix_egui::Shape [−]
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.
Fields of Path
Fields of Rect
Fields of Text
Mesh(Mesh)
Tuple Fields of Mesh
0: Mesh
Implementations
impl Shape
impl Shape
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 connects two points.
A line that closes back to the start point again.
Turn a line into equally spaced dots.
Turn a line into dashes.
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
impl Shape
impl Shape
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl UnwindSafe for Shape
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more