#[repr(C, align(4))]pub struct QuadFlat {
pub tag: u32,
pub color_cmd: u32,
pub v0: u32,
pub v1: u32,
pub v2: u32,
pub v3: u32,
}Expand description
Flat-shaded quad. 6 words (tag + 5 data).
Fields§
§tag: u32OT linkage.
color_cmd: u32opcode | color.
v0: u32Vertex 0.
v1: u32Vertex 1.
v2: u32Vertex 2.
v3: u32Vertex 3.
Implementations§
Source§impl QuadFlat
impl QuadFlat
Sourcepub const fn translucent(self) -> Self
pub const fn translucent(self) -> Self
The same quad drawn with the semi-transparency equation set by the
last GP0(E1h) (crate::Gpu::set_draw_mode).
Sourcepub const fn rect(
origin: (i16, i16),
size: (u16, u16),
color: (u8, u8, u8),
) -> Self
pub const fn rect( origin: (i16, i16), size: (u16, u16), color: (u8, u8, u8), ) -> Self
An axis-aligned rectangle: size pixels from origin, in color.
Unlike FillRect it goes through the rasteriser, so it clips to
the draw area and follows the draw offset: the right shape for UI
panels and HUD backgrounds.
Trait Implementations§
impl Copy for QuadFlat
impl Eq for QuadFlat
impl StructuralPartialEq for QuadFlat
Auto Trait Implementations§
impl Freeze for QuadFlat
impl RefUnwindSafe for QuadFlat
impl Send for QuadFlat
impl Sync for QuadFlat
impl Unpin for QuadFlat
impl UnsafeUnpin for QuadFlat
impl UnwindSafe for QuadFlat
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)