pub struct OutlineRef<'a, C: PointCoord> {
pub(super) points: &'a [Point<C>],
pub(super) flags: &'a [PointFlags],
pub(super) contours: &'a [u16],
pub(super) phantom: [Point<C>; 4],
}Expand description
A loaded outline that borrows the caller’s buffers.
Has the same accessors as Outline.
Fields§
§points: &'a [Point<C>]§flags: &'a [PointFlags]§contours: &'a [u16]§phantom: [Point<C>; 4]Implementations§
Source§impl<C: PointCoord> OutlineRef<'_, C>
impl<C: PointCoord> OutlineRef<'_, C>
Sourcepub fn flags(&self) -> &[PointFlags]
pub fn flags(&self) -> &[PointFlags]
The flag for each point in Self::points.
Sourcepub fn phantom_points(&self) -> &[Point<C>; 4]
pub fn phantom_points(&self) -> &[Point<C>; 4]
The four phantom points, after scaling, variation and hinting.
Sourcepub fn adjusted_lsb(&self) -> C
pub fn adjusted_lsb(&self) -> C
The left side bearing after scaling, variation and hinting.
Sourcepub fn adjusted_advance_width(&self) -> C
pub fn adjusted_advance_width(&self) -> C
The advance width after scaling, variation and hinting.
Sourcepub fn to_path(&self, start: PathContourStart, sink: &mut impl PathSink) -> bool
pub fn to_path(&self, start: PathContourStart, sink: &mut impl PathSink) -> bool
Converts the outline to path commands, calling sink for each.
start decides where a contour begins when its first point is
off-curve. The point stream leaves that open.
Returns false if the points do not describe a path, on the same terms
as outline_to_path.
Trait Implementations§
Source§impl<'a, C: Clone + PointCoord> Clone for OutlineRef<'a, C>
impl<'a, C: Clone + PointCoord> Clone for OutlineRef<'a, C>
Source§fn clone(&self) -> OutlineRef<'a, C>
fn clone(&self) -> OutlineRef<'a, C>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, C> Freeze for OutlineRef<'a, C>where
C: Freeze,
impl<'a, C> RefUnwindSafe for OutlineRef<'a, C>where
C: RefUnwindSafe,
impl<'a, C> Send for OutlineRef<'a, C>
impl<'a, C> Sync for OutlineRef<'a, C>where
C: Sync,
impl<'a, C> Unpin for OutlineRef<'a, C>where
C: Unpin,
impl<'a, C> UnsafeUnpin for OutlineRef<'a, C>where
C: UnsafeUnpin,
impl<'a, C> UnwindSafe for OutlineRef<'a, C>where
C: UnwindSafe + RefUnwindSafe,
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