[−][src]Struct msdfgen::Bitmap
Bitmap object
Methods
impl<T> Bitmap<T> where
T: PngColorType + Copy,
T::PngPixelType: From<T>,
[src]
T: PngColorType + Copy,
T::PngPixelType: From<T>,
impl<T> Bitmap<T> where
T: PngColorType,
T: From<<T as PngColorType>::PngPixelType>,
T::PngPixelType: Copy,
[src]
T: PngColorType,
T: From<<T as PngColorType>::PngPixelType>,
T::PngPixelType: Copy,
impl<T> Bitmap<T>
[src]
impl<T> Bitmap<T>
[src]
pub fn width(&self) -> u32
[src]
Get width of bitmap in pixels
pub fn height(&self) -> u32
[src]
Get height of bitmap in pixels
pub fn pixels(&self) -> &[T]
[src]
Get pixel data slice for reading from
pub fn pixels_mut(&mut self) -> &mut [T]
[src]
Get pixel data slice for writing to
pub fn raw_pixels(&self) -> &[u8]
[src]
Get raw pixels data for reading from
pub fn raw_pixels_mut(&mut self) -> &mut [u8]
[src]
Get raw pixels data for writing to
pub fn pixel(&self, x: u32, y: u32) -> &T
[src]
Get pixel with specified coordinates
pub fn pixel_mut(&mut self, x: u32, y: u32) -> &mut T
[src]
Get pixel with specified coordinates
pub fn invert(&mut self) where
T: Pixel,
[src]
T: Pixel,
Invert pixels colors
pub fn flip_x(&mut self)
[src]
Flip pixels around y axis
pub fn flip_y(&mut self)
[src]
Flip pixels around y axis
pub fn convert<R>(&self) -> Bitmap<R> where
T: Copy,
R: From<T>,
[src]
T: Copy,
R: From<T>,
Convert bitmap data type
impl<S> Bitmap<S>
[src]
pub fn render<T: RenderTarget<S>>(&self, target: &mut Bitmap<T>, px_range: f64)
[src]
Trait Implementations
impl<T> Drop for Bitmap<T>
[src]
impl<'a, A, T> From<&'a Bitmap<A>> for Bitmap<T> where
A: Copy,
T: From<A>,
[src]
A: Copy,
T: From<A>,
Auto Trait Implementations
impl<T> RefUnwindSafe for Bitmap<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for Bitmap<T>
impl<T> !Sync for Bitmap<T>
impl<T> Unpin for Bitmap<T>
impl<T> UnwindSafe for Bitmap<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,