[−][src]Enum conrod_core::render::PrimitiveKind
The unique kind for each primitive element in the Ui.
Variants
A filled Rectangle
.
These are produced by the Rectangle
and BorderedRectangle
primitive widgets. A Filled
Rectangle
widget produces a single Rectangle
. The BorderedRectangle
produces two
Rectangle
s, the first for the outer border and the second for the inner on top.
Fields of Rectangle
color: Color
The fill colour for the rectangle.
A series of consecutive Triangles
that are all the same color.
Fields of TrianglesSingleColor
A series of consecutive Triangles
with unique colors per vertex.
This variant is produced by the general purpose Triangles
primitive widget.
Fields of TrianglesMultiColor
triangles: &'a [Triangle<ColoredPoint>]
An ordered slice of multicolored triangles.
A single Image
, produced by the primitive Image
widget.
Fields of Image
A single block of Text
, produced by the primitive Text
widget.
Fields of Text
color: Color
The colour of the Text
.
text: Text<'a>
All glyphs within the Text
laid out in their correct positions in order from top-left
to bottom right.
font_id: Id
The unique identifier for the font, useful for the glyph_cache.rect_for(id, glyph)
method when using the conrod::text::GlyphCache
(rusttype's GPU Cache
).
Other(&'a Container)
An Other
variant will be yielded for every non-primitive widget in the list.
Most of the time, this variant can be ignored, however it is useful for users who need to
render widgets in ways that cannot be covered by the other PrimitiveKind
variants.
For example, a Shader
widget might be required for updating uniforms in user rendering
code. In order to access the unique state of this widget, the user can check Other
variants for a container whose kind
field matches the unique kind of the Shader
widget.
They can then retrieve the unique state of the widget and cast it to its actual type using
either of the Container::state_and_style
or Container::unique_widget_state
methods.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PrimitiveKind<'a>
impl<'a> !Send for PrimitiveKind<'a>
impl<'a> !Sync for PrimitiveKind<'a>
impl<'a> Unpin for PrimitiveKind<'a>
impl<'a> !UnwindSafe for PrimitiveKind<'a>
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,
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, 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.
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>,