Struct elma_lgr::Lgr [] [src]

pub struct Lgr {
    pub images: BTreeMap<String, Image>,
    pub palette: Vec<u8>,
}

Content of an LGR file.

Fields

All images contained in this LGR. Names include .pcx extension.

Palette contains 256-colors, format is R0, G0, B0, R1, G1, B1, ...

Methods

impl Lgr
[src]

Get color from LGR palette. There are 256 colors in the palette.

Returns triple (R, G, B).

Read LGR from file.

Arguments:

  • load_pixels - load pixels from PCX images and store them into Image::pixels.
  • load_raw_pcx - load raw byte content of PCX images into Image::pcx.

If you are going to use LGR for rendering then set load_pixels to true and load_raw_pcx to false. If you wat to extract files from LGR then set load_pixels to false and load_raw_pcx to true.

Read LGR from stream.

See description of load_from_file for more info.

Trait Implementations

impl Debug for Lgr
[src]

Formats the value using the given formatter.

impl Clone for Lgr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more