[−][src]Enum sixtyfps_corelib::graphics::HighLevelRenderingPrimitive
The run-time library uses this enum to instruct the GraphicsBackend to render SixtyFPS
graphics items.
The different variants of this enum closely resemble the properties found in the .60
mark-up language for various items. More specifically this enum typically holds the
properties that usually require for the allocation and uploading of GPU side data, such
as vertex buffers or textures. Other properties such as colors not part of the enum but
are provided to the back-end using RenderingVariable. That means that certain variants
of this enum relate to a sequence of rendering variables.
Always absent here are the starting coordinates for the primitives. Those are provided using a translation in the transform parameter of Frame::render_primitive.
Variants
There is nothing to draw.
Associated rendering variables: None.
Renders a rectangle with the specified width
and height
, as well as a border
around it. The border_width
specifies the width to use for the border, and the
border_radius
can be used to render a rounded rectangle.
Expected rendering variables:
RenderingVariable::Color
: The color to fill the rectangle with.RenderingVariable::Color
: The color to use for stroking the border of the rectangle.
Renders a image referenced by the specified source
.
Optional rendering variables:
RenderingVariable::ScaledWidth
: The image will be scaled to the specified width.RenderingVariable::ScaledHeight
: The image will be scaled to the specified height.
Renders the specified text
with a font that matches the specified family (font_family
) and the given
pixel size (font_size
).
Expected rendering variables:
RenderingVariable::Color
: The color to use for rendering the glyphs.RenderingVariable::TextCursor
: Draw a text cursor.
Fields of Text
text: SharedString
font_request: FontRequest
Renders a path specified by the elements
parameter. The path will be scaled to fit into the given
width
and height
. If the stroke_width
is greater than zero, then path will also be outlined.
Expected rendering variables:
RenderingVariable::Color
: The color to use for filling the path.RenderingVariable::Color
: The color to use for the path outline, if a non-zerostroke_width
was specified.
Applies a clip rectangle for all subsequent rendering, with the given width
and height. When rendering the low-level rendering primitive created from this variant, [
Frame::render_primitive`] will return a
vector with cleanup primitives that must be applied in order to unapply the clipping.
Trait Implementations
impl Debug for HighLevelRenderingPrimitive
[src]
impl Default for HighLevelRenderingPrimitive
[src]
impl PartialEq<HighLevelRenderingPrimitive> for HighLevelRenderingPrimitive
[src]
pub fn eq(&self, other: &HighLevelRenderingPrimitive) -> bool
[src]
pub fn ne(&self, other: &HighLevelRenderingPrimitive) -> bool
[src]
impl StructuralPartialEq for HighLevelRenderingPrimitive
[src]
Auto Trait Implementations
impl RefUnwindSafe for HighLevelRenderingPrimitive
impl !Send for HighLevelRenderingPrimitive
impl !Sync for HighLevelRenderingPrimitive
impl Unpin for HighLevelRenderingPrimitive
impl UnwindSafe for HighLevelRenderingPrimitive
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, 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>,