Struct font_kit::canvas::Canvas[][src]

pub struct Canvas {
    pub pixels: Vec<u8>,
    pub size: Size2D<u32>,
    pub stride: usize,
    pub format: Format,
}

An in-memory bitmap surface for glyph rasterization.

Fields

The raw pixel data.

The size of the buffer, in pixels.

The number of bytes between successive rows.

The image format of the canvas.

Methods

impl Canvas
[src]

Creates a new blank canvas with the given pixel size and format.

Stride is automatically calculated from width.

The canvas is initialized with transparent black (all values 0).

Creates a new blank canvas with the given pixel size, stride (number of bytes between successive rows), and format.

The canvas is initialized with transparent black (all values 0).

Auto Trait Implementations

impl Send for Canvas

impl Sync for Canvas