[−][src]Struct rgx_lyon::ShapeBuilder
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]
&mut self,
path: &Path,
options: &FillOptions
) -> Result<(), TessellationError>
Fill an arbitrary path from lyon::path
pub fn stroke(
&mut self,
path: &Path,
options: &StrokeOptions
) -> Result<(), TessellationError>
[src]
&mut self,
path: &Path,
options: &StrokeOptions
) -> Result<(), TessellationError>
Stroke an arbitrary path from lyon::path
Trait Implementations
impl BasicGeometryBuilder for ShapeBuilder
[src]
fn add_vertex(
&mut self,
position: Point
) -> Result<VertexId, GeometryBuilderError>
[src]
&mut self,
position: Point
) -> Result<VertexId, GeometryBuilderError>
impl Debug for ShapeBuilder
[src]
impl Default for ShapeBuilder
[src]
fn default() -> ShapeBuilder
[src]
impl FillGeometryBuilder for ShapeBuilder
[src]
fn add_fill_vertex(
&mut self,
position: Point,
attributes: FillAttributes<'_>
) -> Result<VertexId, GeometryBuilderError>
[src]
&mut self,
position: Point,
attributes: FillAttributes<'_>
) -> Result<VertexId, GeometryBuilderError>
impl GeometryBuilder for ShapeBuilder
[src]
fn begin_geometry(&mut self)
[src]
fn end_geometry(&mut self) -> Count
[src]
fn add_triangle(&mut self, a: VertexId, b: VertexId, c: VertexId)
[src]
fn abort_geometry(&mut self)
[src]
impl StrokeGeometryBuilder for ShapeBuilder
[src]
fn add_stroke_vertex(
&mut self,
position: Point,
attributes: StrokeAttributes<'_, '_>
) -> Result<VertexId, GeometryBuilderError>
[src]
&mut self,
position: Point,
attributes: StrokeAttributes<'_, '_>
) -> Result<VertexId, GeometryBuilderError>
Auto Trait Implementations
impl RefUnwindSafe for ShapeBuilder
impl Send for ShapeBuilder
impl Sync for ShapeBuilder
impl Unpin for ShapeBuilder
impl UnwindSafe for ShapeBuilder
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<F, OutputVertex> FillVertexConstructor<OutputVertex> for F where
F: Fn(Point2D<f32, UnknownUnit>, FillAttributes<'_>) -> OutputVertex,
[src]
F: Fn(Point2D<f32, UnknownUnit>, FillAttributes<'_>) -> OutputVertex,
fn new_vertex(
&mut self,
position: Point2D<f32, UnknownUnit>,
attributes: FillAttributes<'_>
) -> OutputVertex
[src]
&mut self,
position: Point2D<f32, UnknownUnit>,
attributes: FillAttributes<'_>
) -> OutputVertex
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F, OutputVertex> StrokeVertexConstructor<OutputVertex> for F where
F: Fn(Point2D<f32, UnknownUnit>, StrokeAttributes<'_, '_>) -> OutputVertex,
[src]
F: Fn(Point2D<f32, UnknownUnit>, StrokeAttributes<'_, '_>) -> OutputVertex,
fn new_vertex(
&mut self,
position: Point2D<f32, UnknownUnit>,
attributes: StrokeAttributes<'_, '_>
) -> OutputVertex
[src]
&mut self,
position: Point2D<f32, UnknownUnit>,
attributes: StrokeAttributes<'_, '_>
) -> OutputVertex
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>,