Struct passpartout_printer::image_drawer::ImageDrawer
[−]
[src]
pub struct ImageDrawer<'a> { /* fields omitted */ }
Methods
impl<'a> ImageDrawer<'a>
[src]
pub fn new(easel: &'a mut Easel, size_x: u32, size_y: u32) -> ImageDrawer<'a>
[src]
pub fn draw_top_border(&mut self) -> Result<(), Error>
[src]
Draw the top white border for centering the image along the y-axis.
If the image completely fills the y axis of the easel, this method does no drawing.
pub fn handle_pixel(
&mut self,
rgba: &mut Rgba<u8>,
x: u32,
y: u32
) -> Result<(), Error>
[src]
&mut self,
rgba: &mut Rgba<u8>,
x: u32,
y: u32
) -> Result<(), Error>
Process the next pixel from a given image.
Pixels are not drawn to the screen unless we've hit the end of a row and must draw or there is a color change where we will draw everything up to the current pixel. If you want to draw a pixel by itself, use Easel::draw_pixel() instead.
Arguments
rgba
: The RGBA pixel to handle.x
: The x coordinate of the pixel in image coordinates.y
: The x coordinate of the pixel in image coordinates.
pub fn cleanup_image(&mut self) -> Result<(), Error>
[src]
Draw the bottom white border and clean up the horizontal edges.