Enum epaint::Shape [−][src]
pub enum Shape {
Noop,
Vec(Vec<Shape>),
Circle {
center: Pos2,
radius: f32,
fill: Color32,
stroke: Stroke,
},
LineSegment {
points: [Pos2; 2],
stroke: Stroke,
},
Path {
points: Vec<Pos2>,
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>)
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: bool
If true, connect the first and last of the points together.
This is required if fill != TRANSPARENT
.
fill: Color32
Fill is only supported for convex polygons.
stroke: Stroke
Rect
Fields
rect: Rect
corner_radius: f32
How rounded the corners are. Use 0.0
for no rounding.
fill: Color32
stroke: Stroke
Text
Fields
pos: Pos2
Top left corner of the first character..
color: Color32
Text color (foreground).
fake_italics: bool
If true, tilt the letters for a hacky italics effect.
Mesh(Mesh)
Tuple Fields
0: 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.
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