Enum egui::Shape[][src]

pub enum Shape {
    Noop,
    Vec(Vec<Shape, Global>),
    Circle(CircleShape),
    LineSegment {
        points: [Pos2; 2],
        stroke: Stroke,
    },
    Path(PathShape),
    Rect(RectShape),
    Text(TextShape),
    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, Global>)

Tuple Fields

Recursively nest more shapes - sometimes a convenience to be able to do. For performance reasons it is better to avoid it.

Circle(CircleShape)

Tuple Fields

LineSegment

Fields

points: [Pos2; 2]
stroke: Stroke

Path(PathShape)

Tuple Fields

Rect(RectShape)

Tuple Fields

Text(TextShape)

Tuple Fields

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 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.

Move the shape by this many points, in-place.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.