#[repr(C, align(4))]pub struct LineGouraud {
pub tag: u32,
pub color0_command: u32,
pub v0: u32,
pub color1: u32,
pub v1: u32,
}Expand description
Gouraud-shaded single line (GP0 50h). 5 words (tag + 4 data).
The GPU interpolates the colour from one endpoint to the other.
Fields§
§tag: u32OT linkage.
color0_command: u320x50000000 | start color.
v0: u32Start point.
color1: u32End color.
v1: u32End point.
Implementations§
Source§impl LineGouraud
impl LineGouraud
Sourcepub const fn new(
from: (i16, i16),
from_color: (u8, u8, u8),
to: (i16, i16),
to_color: (u8, u8, u8),
) -> Self
pub const fn new( from: (i16, i16), from_color: (u8, u8, u8), to: (i16, i16), to_color: (u8, u8, u8), ) -> Self
A line from from to to, shaded from from_color to to_color.
Sourcepub const fn translucent(self) -> Self
pub const fn translucent(self) -> Self
The same line drawn with the semi-transparency equation set by the
last GP0(E1h) (crate::Gpu::set_draw_mode).
Trait Implementations§
Source§impl Clone for LineGouraud
impl Clone for LineGouraud
Source§fn clone(&self) -> LineGouraud
fn clone(&self) -> LineGouraud
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineGouraud
impl Debug for LineGouraud
Source§impl GpuPacket for LineGouraud
impl GpuPacket for LineGouraud
Source§impl Hash for LineGouraud
impl Hash for LineGouraud
Source§impl PartialEq for LineGouraud
impl PartialEq for LineGouraud
impl Copy for LineGouraud
impl Eq for LineGouraud
impl StructuralPartialEq for LineGouraud
Auto Trait Implementations§
impl Freeze for LineGouraud
impl RefUnwindSafe for LineGouraud
impl Send for LineGouraud
impl Sync for LineGouraud
impl Unpin for LineGouraud
impl UnsafeUnpin for LineGouraud
impl UnwindSafe for LineGouraud
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)