Struct signum::raster::Page[][src]

pub struct Page { /* fields omitted */ }

A virtual page that works just like the atari monochrome screen

The width and height are in pixels. The width works best if it is a multiple of 8. Every u8 in the buffer is represents 8 sequential pixels in a row where 0 is white (no ink) and 1 is black (ink).

Implementations

impl Page[src]

pub fn from_screen(screen: MonochromeScreen) -> Self[src]

Turn a (fixed-size) screen into a (variable-sized) page

impl Page[src]

pub fn new(width: u32, height: u32) -> Self[src]

Create a new page with the given dimensions

pub fn print(&self)[src]

This function prints an images to the console.

Use this for small images only

pub fn draw_printer_char(
    &mut self,
    x: u32,
    y: u32,
    ch: &PSetChar<'_>
) -> Result<(), DrawPrintErr>
[src]

Draw a single printer char on the page

pub fn draw_echar(
    &mut self,
    x: u16,
    y: u16,
    ch: &EChar<'_>
) -> Result<(), DrawPrintErr>
[src]

Draw a single editor char on the page

pub fn draw_image(
    &mut self,
    px: u32,
    py: u32,
    w: u32,
    h: u32,
    image: &Self,
    sel: ImageArea
)
[src]

Draw an image on the page

pub fn to_image(&self) -> GrayImage[src]

This is supported on crate feature image only.

Turn the page into a GrayImage from the image crate

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.