[][src]Struct rgx_lyon::ShapeBuilder

pub struct ShapeBuilder {
    pub default_color: [f32; 4],
    // some fields omitted
}

Builds a shape using lyon for tesselation

Fields

default_color: [f32; 4]

This RGBA color is used when tesselating a path with no color data (Attributes in lyon terminology)

Implementations

impl ShapeBuilder[src]

pub fn new(zdepth: ZDepth, default_color: [f32; 4]) -> Self[src]

Create a new ShapeBuilder with a given ZDepth

Arguments

  • zdepth - The z depth for shapes in this builder to have

pub fn prepare(&self, renderer: &Renderer) -> Shape[src]

Prepare and load this builder into the renderer.

This does not consume the builder, because wgpu copies the buffer rather than taking ownerhip.

pub fn fill(
    &mut self,
    path: &Path,
    options: &FillOptions
) -> Result<(), TessellationError>
[src]

Fill an arbitrary path from lyon::path

pub fn stroke(
    &mut self,
    path: &Path,
    options: &StrokeOptions
) -> Result<(), TessellationError>
[src]

Stroke an arbitrary path from lyon::path

Trait Implementations

impl BasicGeometryBuilder for ShapeBuilder[src]

impl Debug for ShapeBuilder[src]

impl Default for ShapeBuilder[src]

impl FillGeometryBuilder for ShapeBuilder[src]

impl GeometryBuilder for ShapeBuilder[src]

impl StrokeGeometryBuilder for ShapeBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<F, OutputVertex> FillVertexConstructor<OutputVertex> for F where
    F: Fn(Point2D<f32, UnknownUnit>, FillAttributes<'_>) -> OutputVertex, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F, OutputVertex> StrokeVertexConstructor<OutputVertex> for F where
    F: Fn(Point2D<f32, UnknownUnit>, StrokeAttributes<'_, '_>) -> OutputVertex, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.