//! .glif `` and `` pub mod contour; pub use contour::Reverse; mod conv; pub use conv::{IntoGlifPoints, ToOutline}; pub use conv::{PenOperations, PenOperationsContour, PenOperationsPath, IntoPenOperations, SplitPenOperations}; pub mod create; mod kurbo; pub use self::kurbo::*; mod quad_to_cubic; pub use quad_to_cubic::QuadToCubic; mod refigure; mod reverse; pub use refigure::*; pub mod skia; mod xml; #[cfg(feature = "glifserde")] use serde::{Serialize, Deserialize}; use crate::component::GlifComponent; use crate::point::{GlifPoint, Point}; pub type Contour = Vec>; pub type Outline = Vec>; pub type GlifContour = Vec; #[cfg_attr(feature = "glifserde", derive(Serialize, Deserialize))] #[derive(Clone, Debug, PartialEq, Hash)] pub struct GlifOutline { pub contours: Vec, pub components: Vec, } impl std::ops::Deref for GlifOutline { type Target = Vec; fn deref(&self) -> &Vec { &self.contours } } impl std::ops::DerefMut for GlifOutline { fn deref_mut(&mut self) -> &mut Vec { &mut self.contours } } impl Default for GlifOutline { fn default() -> Self { Self { contours: vec![], components: vec![], } } } impl GlifOutline { pub fn new() -> Self { Default::default() } } impl From> for GlifOutline { fn from(v: Vec) -> Self { Self { contours: v, .. Default::default() } } }