Enum egui::Shape [−][src]
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)
Implementations
impl Shape
[src]
pub fn line_segment(points: [Pos2; 2], stroke: impl Into<Stroke>) -> Shape
[src]
pub fn line(points: Vec<Pos2, Global>, stroke: impl Into<Stroke>) -> Shape
[src]
pub fn closed_line(
points: Vec<Pos2, Global>,
stroke: impl Into<Stroke>
) -> Shape
[src]
points: Vec<Pos2, Global>,
stroke: impl Into<Stroke>
) -> Shape
pub fn polygon(
points: Vec<Pos2, Global>,
fill: impl Into<Color32>,
stroke: impl Into<Stroke>
) -> Shape
[src]
points: Vec<Pos2, Global>,
fill: impl Into<Color32>,
stroke: impl Into<Stroke>
) -> Shape
pub fn circle_filled(
center: Pos2,
radius: f32,
fill_color: impl Into<Color32>
) -> Shape
[src]
center: Pos2,
radius: f32,
fill_color: impl Into<Color32>
) -> Shape
pub fn circle_stroke(
center: Pos2,
radius: f32,
stroke: impl Into<Stroke>
) -> Shape
[src]
center: Pos2,
radius: f32,
stroke: impl Into<Stroke>
) -> Shape
pub fn rect_filled(
rect: Rect,
corner_radius: f32,
fill_color: impl Into<Color32>
) -> Shape
[src]
rect: Rect,
corner_radius: f32,
fill_color: impl Into<Color32>
) -> Shape
pub fn rect_stroke(
rect: Rect,
corner_radius: f32,
stroke: impl Into<Stroke>
) -> Shape
[src]
rect: Rect,
corner_radius: f32,
stroke: impl Into<Stroke>
) -> Shape
pub fn text(
fonts: &Fonts,
pos: Pos2,
anchor: Align2,
text: impl Into<String>,
text_style: TextStyle,
color: Color32
) -> Shape
[src]
fonts: &Fonts,
pos: Pos2,
anchor: Align2,
text: impl Into<String>,
text_style: TextStyle,
color: Color32
) -> Shape
impl Shape
[src]
pub fn mesh(mesh: Mesh) -> Shape
[src]
pub fn triangles(mesh: Mesh) -> Shape
[src]
👎 Deprecated:
Renamed mesh
pub fn texture_id(&self) -> TextureId
[src]
pub fn translate(&mut self, delta: Vec2)
[src]
Translate location by this much, in-place
Trait Implementations
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,