pub struct GraphicsPath {
    pub points: Vec<(i32, i32, PointType)>,
    /* private fields */
}
Expand description

graphic path with similar functions like html canvas

Fields§

§points: Vec<(i32, i32, PointType)>

Implementations§

source§

impl GraphicsPath

source

pub fn new() -> GraphicsPath

source

pub fn move_to(&mut self, x: i32, y: i32)

move to position

source

pub fn line_to(&mut self, x: i32, y: i32)

create a line between the last and new point

source

pub fn quadratic_curve_to( &mut self, argx1: i32, argy1: i32, argx2: i32, argy2: i32 )

quadratic bezier curve

source

pub fn bezier_curve_to( &mut self, argx1: i32, argy1: i32, argx2: i32, argy2: i32, argx3: i32, argy3: i32 )

cubic bezier curve

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.