pub struct SimplePoint {
pub x: i16,
pub y: i16,
pub r: u8,
pub g: u8,
pub b: u8,
pub is_blank: bool,
}Expand description
Core point type. Supports position (x, y), color (r, g, b), and an is_blank flag.
Fields§
§x: i16X-coordinate.
y: i16Y-coordinate.
r: u8Red color value.
g: u8Green color value.
b: u8Blue color value.
is_blank: boolWhether the point is semantically considered a “blanking” point. A blanking point may still encode color information, but we generally do not render these points unless we’re debugging.
Implementations§
Source§impl SimplePoint
impl SimplePoint
Sourcepub fn xy_rgb(x: i16, y: i16, r: u8, g: u8, b: u8) -> SimplePoint
pub fn xy_rgb(x: i16, y: i16, r: u8, g: u8, b: u8) -> SimplePoint
SimplePoint CTOR. Lets you specify colors for each channel separately.
Sourcepub fn xy_blank(x: i16, y: i16) -> SimplePoint
pub fn xy_blank(x: i16, y: i16) -> SimplePoint
SimplePoint CTOR. Crates a blanking point. The blanking boolean is set to true, meaning this is semantically considered to be used for blanking purposes.
Sourcepub fn into_pipeline_pt(&self) -> PipelinePoint
pub fn into_pipeline_pt(&self) -> PipelinePoint
Transform a SimplePoint into a PipelinePoint for math operations.
Sourcepub fn xy_luma(x: i16, y: i16, luminance: u8) -> SimplePoint
pub fn xy_luma(x: i16, y: i16, luminance: u8) -> SimplePoint
SimplePoint CTOR. Uses the same intensity value for all color channels.
Sourcepub fn xy_red(x: i16, y: i16, red: u8) -> SimplePoint
pub fn xy_red(x: i16, y: i16, red: u8) -> SimplePoint
SimplePoint CTOR. Sets only the red color channel.
Sourcepub fn xy_green(x: i16, y: i16, green: u8) -> SimplePoint
pub fn xy_green(x: i16, y: i16, green: u8) -> SimplePoint
SimplePoint CTOR. Sets only the green color channel.
Trait Implementations§
Source§impl Clone for SimplePoint
impl Clone for SimplePoint
Source§fn clone(&self) -> SimplePoint
fn clone(&self) -> SimplePoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more