[−][src]Struct quicksilver::graphics::ShapeRenderer
A way to render complex shapes using the lyon API
The ShapeRenderer has a color, transform, and z-ordering it applies to all
incoming shapes. It outputs the shapes to a mutable Mesh reference, which
can be a standalone mesh object or the one obtained by window.mesh()
Methods
impl<'a> ShapeRenderer<'a>
[src]
pub fn new(mesh: &'a mut Mesh, color: Color) -> ShapeRenderer<'a>
[src]
Create a shape renderer with a target mesh and an initial color
pub fn color(&self) -> Color
[src]
Get the current color of the incoming shapes
pub fn set_color(&mut self, color: Color)
[src]
Set the color of the incoming shapes
pub fn z(&self) -> f32
[src]
Get the Z position of the incoming shapes
pub fn set_z(&mut self, z: f32)
[src]
Set the Z position of the incoming shapes
pub fn transform(&self) -> Transform
[src]
Get the transformation that will be applied to all incoming shapes
pub fn set_transform(&mut self, trans: Transform)
[src]
Set the transformation that will be applied to all incoming shapes
Trait Implementations
impl<'a, Input> GeometryBuilder<Input> for ShapeRenderer<'a> where
Color: VertexConstructor<Input, Vertex>,
[src]
Color: VertexConstructor<Input, Vertex>,
fn begin_geometry(&mut self)
[src]
fn end_geometry(&mut self) -> Count
[src]
fn add_vertex(
&mut self,
vertex: Input
) -> Result<VertexId, GeometryBuilderError>
[src]
&mut self,
vertex: Input
) -> Result<VertexId, GeometryBuilderError>
fn add_triangle(&mut self, a: VertexId, b: VertexId, c: VertexId)
[src]
fn abort_geometry(&mut self)
[src]
Auto Trait Implementations
impl<'a> !Send for ShapeRenderer<'a>
impl<'a> !Sync for ShapeRenderer<'a>
impl<'a> Unpin for ShapeRenderer<'a>
impl<'a> !UnwindSafe for ShapeRenderer<'a>
impl<'a> !RefUnwindSafe for ShapeRenderer<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Downcast for T where
T: Any,
T: Any,