[][src]Trait spectrusty_core::video::pixel::Palette

pub trait Palette {
    type Pixel: Copy;
    pub fn get_pixel_gray(index: u8) -> Self::Pixel;
pub fn get_pixel_grb8(g3r3b2: u8) -> Self::Pixel;
pub fn get_pixel_gray8(value: u8) -> Self::Pixel; pub fn get_pixel(index: u8) -> Self::Pixel { ... } }

A trait used for obtaining pixel colors.

Associated Types

type Pixel: Copy[src]

Specifies the type used for pixels.

Loading content...

Required methods

pub fn get_pixel_gray(index: u8) -> Self::Pixel[src]

Should return a grayscale pixel with the intensity of one of the ZX Spectrum colors: [0, 15].

See Palette::get_pixel for color values.

pub fn get_pixel_grb8(g3r3b2: u8) -> Self::Pixel[src]

Should return one of ULAplus colors.

pub fn get_pixel_gray8(value: u8) -> Self::Pixel[src]

Should return a grayscale pixel (0 - black, 255 - full intensity white).

Loading content...

Provided methods

pub fn get_pixel(index: u8) -> Self::Pixel[src]

Should return one of ZX Spectrum pixel colors:

index color   index color
  0 - black     8 - bright black (same as black)
  1 - blue      9 - bright blue
  2 - red      10 - bright red
  3 - magenta  11 - bright magenta
  4 - green    12 - bright green
  5 - cyan     13 - bright cyan
  6 - yellow   14 - bright yellow
  7 - white    15 - bright white
Loading content...

Implementors

impl Palette for GrayscalePalA8R8G8B8[src]

type Pixel = u32

impl Palette for GrayscalePalARGB32[src]

type Pixel = [u8; 4]

impl Palette for GrayscalePalR3G3B2[src]

type Pixel = u8

impl Palette for GrayscalePalR5G6B5[src]

type Pixel = u16

impl Palette for GrayscalePalR8G8B8A8[src]

type Pixel = u32

impl Palette for GrayscalePalRGB24[src]

type Pixel = [u8; 3]

impl Palette for GrayscalePalRGBA32[src]

type Pixel = [u8; 4]

impl Palette for SpectrumPalA8R8G8B8[src]

type Pixel = u32

impl Palette for SpectrumPalARGB32[src]

type Pixel = [u8; 4]

impl Palette for SpectrumPalR3G3B2[src]

type Pixel = u8

impl Palette for SpectrumPalR5G6B5[src]

type Pixel = u16

impl Palette for SpectrumPalR8G8B8A8[src]

type Pixel = u32

impl Palette for SpectrumPalRGB24[src]

type Pixel = [u8; 3]

impl Palette for SpectrumPalRGBA32[src]

type Pixel = [u8; 4]

Loading content...