pub struct BufferLengths {
pub points: u32,
pub contours: u32,
pub unscaled: u32,
pub deltas: u32,
pub iup: u32,
pub composite_deltas: u32,
}Expand description
How long each scratch buffer an outline needs has to be.
These are element counts, not byte lengths: the element types differ per
buffer and, for the coordinate buffers, per Scale. For the bytes one
block needs to hold them all, see packed_len.
Created by OutlinePlan::buffer_lengths.
Fields§
§points: u32Scaled points, including phantom points. The flag buffer is this long too, since there is one flag per point.
contours: u32Contour end point indices.
unscaled: u32Points in font units, or zero when the Scale does not keep them.
deltas: u32Accumulated variation deltas, or zero for a non-variable draw.
iup: u32Working space for interpolating sparse deltas.
composite_deltas: u32Per-component deltas for composite glyphs.
Implementations§
Source§impl BufferLengths
impl BufferLengths
Sourcepub fn packed_len<S: Scale>(&self) -> usize
pub fn packed_len<S: Scale>(&self) -> usize
The number of bytes Buffers::from_bytes needs to carve every
buffer from one block.
Includes room to align the block, which need not be aligned already. Zero when the outline needs no storage.
Trait Implementations§
Source§impl Clone for BufferLengths
impl Clone for BufferLengths
Source§fn clone(&self) -> BufferLengths
fn clone(&self) -> BufferLengths
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more