pub struct Axis {
pub(crate) dim: Dimension,
pub(crate) major_dir: Direction,
pub(crate) segments: SmallVec<Segment, MAX_INLINE_SEGMENTS>,
pub(crate) edges: SmallVec<Edge, MAX_INLINE_EDGES>,
}Expand description
Segments and edges for one dimension of an outline.
Fields§
§dim: DimensionEither horizontal or vertical.
major_dir: DirectionDepends on dimension and outline orientation.
segments: SmallVec<Segment, MAX_INLINE_SEGMENTS>Collection of segments for the axis.
edges: SmallVec<Edge, MAX_INLINE_EDGES>Collection of edges for the axis.
Implementations§
Source§impl Axis
impl Axis
Sourcepub fn major_direction(&self) -> Direction
pub fn major_direction(&self) -> Direction
Returns the dominant direction, depending on dimension and the orientation of the outline.
Source§impl Axis
impl Axis
pub(crate) fn reset(&mut self, dim: Dimension, orientation: Option<Orientation>)
Sourcepub(crate) fn insert_edge(&mut self, edge: Edge, top_to_bottom_hinting: bool)
pub(crate) fn insert_edge(&mut self, edge: Edge, top_to_bottom_hinting: bool)
Inserts the given edge into the sorted edge list.
Sourcepub(crate) fn append_segment_to_edge(
&mut self,
segment_ix: usize,
edge_ix: usize,
)
pub(crate) fn append_segment_to_edge( &mut self, segment_ix: usize, edge_ix: usize, )
Links the given segment and edge.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnsafeUnpin for Axis
impl UnwindSafe for Axis
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