Enum epaint::Shape [−][src]
#[must_use = "Add a Shape to a Painter"] 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), }
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
impl Shape
[src]
impl Shape
[src]pub fn line_segment(points: [Pos2; 2], stroke: impl Into<Stroke>) -> Self
[src]
pub fn line(points: Vec<Pos2>, stroke: impl Into<Stroke>) -> Self
[src]
pub fn closed_line(points: Vec<Pos2>, stroke: impl Into<Stroke>) -> Self
[src]
pub fn polygon(
points: Vec<Pos2>,
fill: impl Into<Color32>,
stroke: impl Into<Stroke>
) -> Self
[src]
points: Vec<Pos2>,
fill: impl Into<Color32>,
stroke: impl Into<Stroke>
) -> Self
pub fn circle_filled(
center: Pos2,
radius: f32,
fill_color: impl Into<Color32>
) -> Self
[src]
center: Pos2,
radius: f32,
fill_color: impl Into<Color32>
) -> Self
pub fn circle_stroke(
center: Pos2,
radius: f32,
stroke: impl Into<Stroke>
) -> Self
[src]
center: Pos2,
radius: f32,
stroke: impl Into<Stroke>
) -> Self
pub fn rect_filled(
rect: Rect,
corner_radius: f32,
fill_color: impl Into<Color32>
) -> Self
[src]
rect: Rect,
corner_radius: f32,
fill_color: impl Into<Color32>
) -> Self
pub fn rect_stroke(
rect: Rect,
corner_radius: f32,
stroke: impl Into<Stroke>
) -> Self
[src]
rect: Rect,
corner_radius: f32,
stroke: impl Into<Stroke>
) -> Self
pub fn text(
fonts: &Fonts,
pos: Pos2,
anchor: Align2,
text: impl ToString,
text_style: TextStyle,
color: Color32
) -> Self
[src]
fonts: &Fonts,
pos: Pos2,
anchor: Align2,
text: impl ToString,
text_style: TextStyle,
color: Color32
) -> Self
Trait Implementations
impl StructuralPartialEq for Shape
[src]
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more