Struct sdf_glyph_renderer::BitmapGlyph[][src]

pub struct BitmapGlyph { /* fields omitted */ }
Expand description

A raw bitmap containing only the alpha channel.

Implementations

Creates a new bitmap from scratch.

This constructor is useful when you already have a buffered glyph. If you have the alpha bitmap but still need to buffer it (what you expect from most font renderers, for example), use Self::from_unbuffered() instead.

Panics

The caller is responsible for checking the integrity of the data. If the dimensions provided can’t describe the input data, this function will panic.

Creates a new bitmap from a raw data source, buffered by a given amount.

Most SDF glyphs are buffered a bit so that the outer edges can be properly captured. This constructor does the buffering for you.

Panics

The caller is responsible for checking the integrity of the data. If the dimensions provided can’t describe the input data, this function will panic.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.