#[non_exhaustive]pub struct ColorTable {
pub modifier_flags: ColorTableModifierFlags,
pub configuration_flags: ColorTableConfigurationFlags,
pub constant_alpha: Option<u8>,
pub colors: Vec<Color>,
}Expand description
Stores RGBA color values that can be referenced by pixmap data.
§Use Cases
- Pixmap palettes - When linked to a Pixmap Table, provides the color palette for indexed pixel data.
- Color storage - Can store color sets independently for other purposes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.modifier_flags: ColorTableModifierFlagsWhich optional per-color fields are present.
configuration_flags: ColorTableConfigurationFlagsWhich configuration values below are present for every color.
constant_alpha: Option<u8>If ColorTableConfigurationFlags::ConstantAlpha is enabled.
The alpha channel value applied to all colors in this table.
colors: Vec<Color>The colors stored in this table.
Trait Implementations§
Source§impl Clone for ColorTable
impl Clone for ColorTable
Source§fn clone(&self) -> ColorTable
fn clone(&self) -> ColorTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorTable
impl Debug for ColorTable
Source§impl Default for ColorTable
impl Default for ColorTable
Source§fn default() -> ColorTable
fn default() -> ColorTable
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ColorTable
impl<'de> Deserialize<'de> for ColorTable
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ColorTable
impl Serialize for ColorTable
Source§impl TryFrom<ColorTable> for SPFColorTable
Available on crate feature ffi only.
impl TryFrom<ColorTable> for SPFColorTable
Available on crate feature
ffi only.Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryInto<ColorTable> for &SPFColorTable
Available on crate feature ffi only.
impl TryInto<ColorTable> for &SPFColorTable
Available on crate feature
ffi only.Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ColorTable
impl RefUnwindSafe for ColorTable
impl Send for ColorTable
impl Sync for ColorTable
impl Unpin for ColorTable
impl UnsafeUnpin for ColorTable
impl UnwindSafe for ColorTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more