Skip to content

Commit

Permalink
Documentation tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
metasim committed Sep 28, 2022
1 parent a70e2b2 commit cb1a814
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/raster/rasterband.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,13 @@ impl PaletteInterpretation {
}
}

/// Grayscale [`ColorTable`] entry.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct GrayEntry {
pub g: i16,
}

/// Red, green, blue, alpha [`ColorTable`] entry.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct RgbaEntry {
pub r: i16,
Expand All @@ -869,6 +871,7 @@ pub struct RgbaEntry {
pub a: i16,
}

/// Cyan, magenta, yellow, black [`ColorTable`] entry.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct CmykEntry {
pub c: i16,
Expand All @@ -877,13 +880,15 @@ pub struct CmykEntry {
pub k: i16,
}

/// Hue, lightness, saturation [`ColorTable`] entry.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct HlsEntry {
pub h: i16,
pub l: i16,
pub s: i16,
}

/// Options for defining [`ColorInterpretation::PaletteIndex`] entries in a [`ColorTable`].
#[derive(Copy, Clone, PartialEq, Eq)]
pub enum ColorEntry {
Gray(GrayEntry),
Expand Down Expand Up @@ -993,9 +998,6 @@ impl Debug for ColorEntry {

/// Color table for raster bands that use [`ColorInterpretation::PaletteIndex`] color interpretation.
///
/// This object carries the lifetime of the raster band that
/// contains it. This is necessary to prevent the raster band
/// from being dropped before the color table.
///
/// # Example
///
Expand Down

0 comments on commit cb1a814

Please sign in to comment.