Struct font_atlas::rasterize::Bitmap
[−]
[src]
pub struct Bitmap { /* fields omitted */ }
A rectangular 2d-array of u8 where the values 0 through 255 represent shades of grey.
Methods
impl Bitmap
[src]
fn lines(&self) -> Chunks<u8>
[src]
Return an iterator over the lines of the bitmap going from top to bottom.
fn width(&self) -> usize
[src]
The width of this bitmap
fn height(&self) -> usize
[src]
The height of this bitmap
fn raw(&self) -> &[u8]
[src]
Gain access to the underlying slice of u8.
fn into_raw(self) -> Vec<u8>
[src]
Get the underlying buffer of u8
Trait Implementations
impl Debug for Bitmap
[src]
impl Buffer2d for Bitmap
[src]
type Pixel = u8
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
fn get(&self, x: u32, y: u32) -> Option<Self::Pixel>
[src]
fn set(&mut self, x: u32, y: u32, val: Self::Pixel)
[src]
fn patch<B: Buffer2d<Pixel = Self::Pixel>>(&mut self, x: u32, y: u32, buf: &B)
[src]
fn patch_rotated<B: Buffer2d<Pixel = Self::Pixel>>(
&mut self,
x: u32,
y: u32,
buf: &B
)
[src]
&mut self,
x: u32,
y: u32,
buf: &B
)