Struct elma_lgr::Image [] [src]

pub struct Image {
    pub info: Option<Picture>,
    pub width: u16,
    pub height: u16,
    pub pixels: Vec<u8>,
    pub pcx: Vec<u8>,
}

Image from LGR.

Fields

Optional information describing image.

Width of the image.

Height of the image.

Image pixels. Each pixel is an index into LGR palette.

This array will only contain values if LGR was loaded with load_pixels option.

Raw content of the PCX file.

This array will only contain values if LGR was loaded with load_raw_pcx option.

Methods

impl Image
[src]

Get image pixel. Returned value is an index into LGR palette.

This function will panic if x >= width, y >= height or LGR was loaded with load_pixels set to false.

Trait Implementations

impl Debug for Image
[src]

Formats the value using the given formatter.

impl Clone for Image
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more