Struct rin::graphics::Image [−][src]
pub struct Image { /* fields omitted */ }
Implementations
impl Bitmap
[src]
impl Bitmap
[src]pub fn load<P>(filename: P) -> Result<Bitmap, Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn load_with_format<P>(fif: Format, filename: P) -> Result<Bitmap, Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn load_from_memory(buffer: &[u8]) -> Result<Bitmap, Error>
[src]
pub fn new<T>(
ty: Type,
width: usize,
height: usize,
bpp: usize,
data: Option<&[T]>
) -> Bitmap where
T: Copy,
[src]
ty: Type,
width: usize,
height: usize,
bpp: usize,
data: Option<&[T]>
) -> Bitmap where
T: Copy,
pub fn save<P>(&self, filename: P, flags: i32) -> Result<(), Error> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
pub fn width(&self) -> usize
[src]
pub fn height(&self) -> usize
[src]
pub fn bpp(&self) -> usize
[src]
pub fn ty(&self) -> Type
[src]
pub fn pitch(&self) -> usize
[src]
pub fn bits(&self) -> &[u8]ⓘ
[src]
pub fn pixels<T>(&self) -> &[T]ⓘ
[src]
pub fn bits_mut(&mut self) -> &mut [u8]ⓘ
[src]
pub fn pixels_mut<T>(&mut self) -> &mut [T]ⓘ
[src]
pub fn scanlines(&'a self) -> ScanLines<'a>
[src]
pub fn scanlines_mut(&mut self) -> ScanLinesMut<'_>
[src]
pub fn flip_vertical(self) -> Result<Bitmap, Error>
[src]
pub fn flip_horizontal(self) -> Result<Bitmap, Error>
[src]
pub fn rescale(
&self,
w: usize,
h: usize,
filter: Filter
) -> Result<Bitmap, Error>
[src]
&self,
w: usize,
h: usize,
filter: Filter
) -> Result<Bitmap, Error>
pub fn is_transparent(&self) -> bool
[src]
pub fn to_4bits(&self) -> Result<Bitmap, Error>
[src]
pub fn to_8bits(&self) -> Result<Bitmap, Error>
[src]
pub fn to_greyscale(&self) -> Result<Bitmap, Error>
[src]
pub fn to_16bits555(&self) -> Result<Bitmap, Error>
[src]
pub fn to_16bits565(&self) -> Result<Bitmap, Error>
[src]
pub fn to_24bits(&self) -> Result<Bitmap, Error>
[src]
pub fn to_32bits(&self) -> Result<Bitmap, Error>
[src]
pub fn to(&self, ty: Type) -> Result<Bitmap, Error>
[src]
pub fn red_mask(&self) -> u32
[src]
pub fn green_mask(&self) -> u32
[src]
pub fn blue_mask(&self) -> u32
[src]
pub fn channel(&self, channel: ColorChannel) -> Option<Bitmap>
[src]
pub fn set_channel(
&mut self,
bitmap: &Bitmap,
channel: ColorChannel
) -> Result<(), Error>
[src]
&mut self,
bitmap: &Bitmap,
channel: ColorChannel
) -> Result<(), Error>
Trait Implementations
impl Image for Bitmap
[src]
impl Image for Bitmap
[src]type DataType = u8
pub fn gl_internal_format_type(&self) -> Option<(u32, u32, u32)>
[src]
pub fn width(&self, _level: usize) -> usize
[src]
pub fn height(&self, _level: usize) -> usize
[src]
pub fn pitch_bytes(&self, _level: usize) -> usize
[src]
pub fn bytes_per_pixel(&self) -> usize
[src]
pub fn pitch_components(&self, _level: usize) -> usize
[src]
pub fn num_components(&self) -> usize
[src]
pub fn data(&self) -> &[u8]ⓘ
[src]
pub fn levels(&self) -> usize
[src]
pub fn mipmap(&self, level: usize) -> Option<&[u8]>
[src]
pub fn is_gpu_compressed(&self) -> bool
[src]
pub fn gl_internal(&self) -> Option<u32>
[src]
pub fn gl_format(&self) -> Option<u32>
[src]
pub fn gl_type(&self) -> Option<u32>
[src]
pub fn max_levels(&self) -> usize
[src]
impl Image for Bitmap
[src]
impl Image for Bitmap
[src]pub fn premultiply_alpha(&mut self)
[src]
impl Send for Bitmap
[src]
impl Sync for Bitmap
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]