Struct freetype::bitmap::Bitmap

source ·
pub struct Bitmap { /* private fields */ }

Implementations

A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.

The number of pixels in bitmap row.

The number of bitmap rows.

The pixel mode, i.e., how pixel bits are stored. See PixelMode for possible values.

The pitch’s absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a ‘down’ flow, and negative when it has an ‘up’ flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.

Note that ‘padding’ means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value. For the B/W rasterizer, ‘pitch’ is always an even number.

To change the pitch of a bitmap (say, to make it a multiple of 4), use FT_Bitmap_Convert. Alternatively, you might use callback functions to directly render to the application’s surface; see the file ‘example2.cpp’ in the tutorial for a demonstration.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.