pub enum Primitive {
}
Expand description
A wrapper around all primitive sets of properties so that they may be stored within the
Draw’s drawing
field while they are being drawn.
This also allows us to flush all pending drawings to the mesh if Draw::to_frame
is called
before their respective Drawing types are dropped.
Variants§
Arrow(Arrow)
Ellipse(Ellipse)
Line(Line)
MeshVertexless(Vertexless)
Mesh(Mesh)
PathInit(PathInit)
PathFill(PathFill)
PathStroke(PathStroke)
Path(Path)
PolygonInit(PolygonInit)
Polygon(Polygon)
Quad(Quad)
Rect(Rect)
Text(Text)
Texture(Texture)
Tri(Tri)
Trait Implementations§
source§impl From<PathOptions<FillOptions>> for Primitive
impl From<PathOptions<FillOptions>> for Primitive
source§impl From<PathOptions<StrokeOptions>> for Primitive
impl From<PathOptions<StrokeOptions>> for Primitive
source§fn from(prim: PathStroke) -> Self
fn from(prim: PathStroke) -> Self
Converts to this type from the input type.
source§impl From<PolygonInit> for Primitive
impl From<PolygonInit> for Primitive
source§fn from(prim: PolygonInit) -> Self
fn from(prim: PolygonInit) -> Self
Converts to this type from the input type.
source§impl From<Vertexless> for Primitive
impl From<Vertexless> for Primitive
source§fn from(prim: Vertexless) -> Self
fn from(prim: Vertexless) -> Self
Converts to this type from the input type.
source§impl Into<Option<PathOptions<FillOptions>>> for Primitive
impl Into<Option<PathOptions<FillOptions>>> for Primitive
source§impl Into<Option<PathOptions<StrokeOptions>>> for Primitive
impl Into<Option<PathOptions<StrokeOptions>>> for Primitive
source§fn into(self) -> Option<PathStroke>
fn into(self) -> Option<PathStroke>
Converts this type into the (usually inferred) input type.
source§impl Into<Option<PolygonInit>> for Primitive
impl Into<Option<PolygonInit>> for Primitive
source§fn into(self) -> Option<PolygonInit>
fn into(self) -> Option<PolygonInit>
Converts this type into the (usually inferred) input type.
source§impl Into<Option<Vertexless>> for Primitive
impl Into<Option<Vertexless>> for Primitive
source§fn into(self) -> Option<Vertexless>
fn into(self) -> Option<Vertexless>
Converts this type into the (usually inferred) input type.
source§impl RenderPrimitive for Primitive
impl RenderPrimitive for Primitive
source§fn render_primitive(
self,
ctxt: RenderContext<'_>,
mesh: &mut Mesh
) -> PrimitiveRender
fn render_primitive( self, ctxt: RenderContext<'_>, mesh: &mut Mesh ) -> PrimitiveRender
Render self into the given mesh.
Auto Trait Implementations§
impl !RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl !UnwindSafe for Primitive
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds
error is returned which contains the unclamped color. Read more