pub struct Quad {
pub texture: Texture,
pub rect: [f32; 4],
pub uv: [f32; 4],
pub color: [u8; 4],
pub clip: Option<[i32; 4]>,
pub rotation: f32,
}Expand description
One textured rectangle to draw. Ui::draw returns them in drawing order.
Fields§
§texture: TextureWhat the quad samples from.
rect: [f32; 4]The rectangle in pixels: x0, y0, x1, y1.
uv: [f32; 4]The texture coordinates: u0, v0, u1, v1.
color: [u8; 4]The colour that multiplies the texture: red, green, blue, alpha.
clip: Option<[i32; 4]>Scissor rectangle (x0, y0, x1, y1) in pixels.
rotation: f32Degrees about the rectangle’s centre, clockwise on screen (ImageElement::SetRotation).
Trait Implementations§
impl Copy for Quad
impl StructuralPartialEq for Quad
Auto Trait Implementations§
impl Freeze for Quad
impl RefUnwindSafe for Quad
impl Send for Quad
impl Sync for Quad
impl Unpin for Quad
impl UnsafeUnpin for Quad
impl UnwindSafe for Quad
Blanket Implementations§
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