Struct buffer_graphics_lib::image_loading::indexed::IndexedImage
source · pub struct IndexedImage { /* private fields */ }Implementations§
source§impl IndexedImage
impl IndexedImage
source§impl IndexedImage
impl IndexedImage
pub fn color(&self, idx: u8) -> Color
pub fn colors(&self) -> &Vec<Color>
pub fn colors_mut(&mut self) -> &mut Vec<Color>
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn pixels(&self) -> &Vec<u8>
pub fn pixels_mut(&mut self) -> &mut Vec<u8>
pub fn apply_new_colors(&mut self, colors: Vec<Color>)
source§impl IndexedImage
impl IndexedImage
pub fn to_image(&self) -> Result<Image, IndexedImageError>
pub fn to_renderable<P: Into<Coord>>(
&self,
xy: P,
offset: DrawOffset
) -> Result<RenderableImage, IndexedImageError>
Trait Implementations§
source§impl Clone for IndexedImage
impl Clone for IndexedImage
source§fn clone(&self) -> IndexedImage
fn clone(&self) -> IndexedImage
Returns a copy of the value. Read more
1.0.0 · 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 IndexedImage
impl Debug for IndexedImage
source§impl<'de> Deserialize<'de> for IndexedImage
impl<'de> Deserialize<'de> for IndexedImage
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 PartialEq<IndexedImage> for IndexedImage
impl PartialEq<IndexedImage> for IndexedImage
source§fn eq(&self, other: &IndexedImage) -> bool
fn eq(&self, other: &IndexedImage) -> bool
This method tests for
self and other values to be equal, and is used
by ==.