pub struct GlifPoint {
pub x: IntegerOrFloat,
pub y: IntegerOrFloat,
pub smooth: bool,
pub name: Option<String>,
pub ptype: PointType,
}Expand description
A “close to the source” .glif <point>
Fields§
§x: IntegerOrFloat§y: IntegerOrFloat§smooth: bool§name: Option<String>§ptype: PointTypeImplementations§
Source§impl GlifPoint
impl GlifPoint
pub fn from_kurbo(kp: Point, pt: PointType) -> Self
pub fn from_kurbo_offcurve(kp: Point) -> Self
Source§impl GlifPoint
impl GlifPoint
pub fn from_handle<PD: PointData>(point: &Point<PD>, wh: WhichHandle) -> Self
Source§impl GlifPoint
impl GlifPoint
Sourcepub fn from_x_y_type(
(x, y): (impl Into<IntegerOrFloat>, impl Into<IntegerOrFloat>),
ptype: PointType,
) -> GlifPoint
pub fn from_x_y_type( (x, y): (impl Into<IntegerOrFloat>, impl Into<IntegerOrFloat>), ptype: PointType, ) -> GlifPoint
Make a point from its x and y position and type
pub fn name(self, name: Option<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GlifPoint
impl<'de> Deserialize<'de> for GlifPoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PointLike for GlifPoint
impl PointLike for GlifPoint
fn x(&self) -> IntegerOrFloat
fn y(&self) -> IntegerOrFloat
fn set_x(&mut self, x: IntegerOrFloat)
fn set_y(&mut self, y: IntegerOrFloat)
fn x32(&self) -> f32
fn y32(&self) -> f32
fn x64(&self) -> f64
fn y64(&self) -> f64
fn as_kpoint(&self) -> KurboPoint
Source§impl RoundToInt for GlifPoint
impl RoundToInt for GlifPoint
fn round_to_int(&mut self)
impl StructuralPartialEq for GlifPoint
Auto Trait Implementations§
impl Freeze for GlifPoint
impl RefUnwindSafe for GlifPoint
impl Send for GlifPoint
impl Sync for GlifPoint
impl Unpin for GlifPoint
impl UnwindSafe for GlifPoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more