pub struct Outline {
pub pts: Vec<(f32, f32)>,
pub tags: Vec<u8>,
pub ends: Vec<u32>,
pub err: bool,
/* private fields */
}Fields§
§pts: Vec<(f32, f32)>§ends: Vec<u32>§err: boolImplementations§
Source§impl Outline
impl Outline
pub fn npts(&self) -> usize
Sourcepub fn point(&mut self, x: f32, y: f32, tag: u8) -> bool
pub fn point(&mut self, x: f32, y: f32, tag: u8) -> bool
append a point (font units, OLT_*) [ol_point]
Sourcepub fn reserve(&mut self, n: usize) -> Option<usize>
pub fn reserve(&mut self, n: usize) -> Option<usize>
append n points (0, 0, OLT_OFF) to be filled in; the index of the first [ol_reserve]
Sourcepub fn contour(&mut self, last: u32) -> bool
pub fn contour(&mut self, last: u32) -> bool
end a contour at point index last (last < cstart: empty, ignored) [ol_contour]
pub fn owner_set(&mut self, serial: u64, glyph: u32)
pub fn owner_is(&self, serial: u64, glyph: u32) -> bool
Sourcepub fn bbox(&self) -> Option<[i32; 4]>
pub fn bbox(&self) -> Option<[i32; 4]>
control box {xmin, ymin, xmax, ymax} (floor / ceil, clamped to +-1e6) [ol_box]
Sourcepub fn transform(&mut self, from: usize, a: f32, b: f32, c: f32, d: f32)
pub fn transform(&mut self, from: usize, a: f32, b: f32, c: f32, d: f32)
points from..n: (x, y) -> (a x + c y, b x + d y) [ol_transform]
Sourcepub fn translate(&mut self, from: usize, dx: f32, dy: f32)
pub fn translate(&mut self, from: usize, dx: f32, dy: f32)
points from..n += (dx, dy) [ol_translate]
Trait Implementations§
Auto Trait Implementations§
impl Forget for Outline
impl Freeze for Outline
impl RefUnwindSafe for Outline
impl Send for Outline
impl Sync for Outline
impl Unpin for Outline
impl UnsafeUnpin for Outline
impl UnwindSafe for Outline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more