Enum bevy_retrograde_epaint::prelude::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
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
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
pub fn vzip(self) -> V