[][src]Struct ggraphics::QuadData

#[repr(C)]
pub struct QuadData {
    pub color: [f32; 4],
    pub src_rect: [f32; 4],
    pub dst_rect: [f32; 4],
    pub offset: [f32; 2],
    pub rotation: f32,
}

Data we need for each quad instance. DrawParam gets turned into this, eventually. We have to be quite particular about layout since this gets fed straight to the shader.

Fields

color: [f32; 4]

Color to blend the result texture with.

src_rect: [f32; 4]

Source region on the texture to draw, coordinates range from 0 to 1

dst_rect: [f32; 4]

Destination rectangle in your render target to draw the texture on, coordinates are whatever you set in your transform and viewport.

offset: [f32; 2]

Rotation offset -- A point within your dst_rect to rotate around, coordinates range from 0 to 1

rotation: f32

Rotation, in radians, CCW.

Methods

impl QuadData[src]

pub const fn empty() -> Self[src]

Returns an empty QuadData with default values.

Trait Implementations

impl Clone for QuadData[src]

impl Copy for QuadData[src]

impl PartialEq<QuadData> for QuadData[src]

impl PartialOrd<QuadData> for QuadData[src]

impl Debug for QuadData[src]

impl StructuralPartialEq for QuadData[src]

impl Zeroable for QuadData[src]

impl Pod for QuadData[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = !

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.

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

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

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