Struct plotters_bitmap::bitmap_pixel::RGBPixel[][src]

pub struct RGBPixel;
Expand description

The marker type that indicates we are currently using a RGB888 pixel format

Trait Implementations

impl PixelFormat for RGBPixel[src]

const PIXEL_SIZE: usize[src]

Number of bytes per pixel

const EFFECTIVE_PIXEL_SIZE: usize[src]

Number of effective bytes per pixel, e.g. for BGRX pixel format, the size of pixel is 4 but the effective size is 3, since the 4th byte isn’t used Read more

fn byte_at(r: u8, g: u8, b: u8, _a: u64, idx: usize) -> u8[src]

Encoding a pixel and returns the idx-th byte for the pixel

fn decode_pixel(data: &[u8]) -> (u8, u8, u8, u64)[src]

Decode a pixel at the given location

fn can_be_saved() -> bool[src]

Indicates if this pixel format can be saved as image. Note: Currently we only using RGB pixel format in the image crate, but later we may lift this restriction Read more

fn blend_rect_fast(
    target: &mut BitMapBackend<'_, Self>,
    upper_left: (i32, i32),
    bottom_right: (i32, i32),
    r: u8,
    g: u8,
    b: u8,
    a: f64
)
[src]

The fast alpha blending algorithm for this pixel format Read more

fn fill_rect_fast(
    target: &mut BitMapBackend<'_, Self>,
    upper_left: (i32, i32),
    bottom_right: (i32, i32),
    r: u8,
    g: u8,
    b: u8
)
[src]

The fast rectangle filling algorithm Read more

fn fill_vertical_line_fast(
    target: &mut BitMapBackend<'_, Self>,
    x: i32,
    ys: (i32, i32),
    r: u8,
    g: u8,
    b: u8
)
[src]

The fast vertical line filling algorithm Read more

fn draw_pixel(
    target: &mut BitMapBackend<'_, Self>,
    point: (i32, i32),
    (r, g, b): (u8, u8, u8),
    alpha: f64
)
[src]

Drawing a single pixel in this format Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.