Struct pixels_graphics_lib::prelude::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, Global>
pub fn colors_mut(&mut self) -> &mut Vec<Color, Global>
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn pixels(&self) -> &Vec<u8, Global>
pub fn pixels_mut(&mut self) -> &mut Vec<u8, Global>
pub fn apply_new_colors(&mut self, colors: Vec<Color, Global>)
source§impl IndexedImage
impl IndexedImage
pub fn to_image(&self) -> Result<Image, IndexedImageError>
pub fn to_renderable<P>(
&self,
xy: P,
offset: DrawOffset
) -> Result<RenderableImage, IndexedImageError>where
P: Into<Coord>,
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<IndexedImage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<IndexedImage, <__D as Deserializer<'de>>::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 ==
.source§impl Serialize for IndexedImage
impl Serialize for IndexedImage
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more