Struct RoughGenerator

Source
pub struct RoughGenerator {
    pub config: RoughConfig,
    pub default_options: RoughOptions,
}

Fields§

§config: RoughConfig§default_options: RoughOptions

Implementations§

Source§

impl RoughGenerator

Source

pub fn new(config: RoughConfig) -> Self

Source

pub fn new_seed(&self) -> u64

Source

pub fn line<'a>( &self, x1: f64, y1: f64, x2: f64, y2: f64, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn rectangle<'a>( &self, x: f64, y: f64, width: f64, height: f64, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn ellipse<'a>( &self, x: f64, y: f64, width: f64, height: f64, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn circle<'a>( &self, x: f64, y: f64, diameter: f64, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn linear_path<'a>( &self, points: &Vec<Point<f64>>, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn arc<'a>( &self, x: f64, y: f64, width: f64, height: f64, start: f64, stop: f64, closed: bool, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn curve<'a>( &self, points: &Vec<Point<f64>>, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn polygon<'a>( &self, points: &Vec<Point<f64>>, options: &'a RoughOptions, ) -> Drawable<'a>

Source

pub fn path<'a>(&self, d: &str, options: &'a RoughOptions) -> Drawable<'a>

Source

pub fn ops_to_path(&self, drawing: &OpSet) -> String

Source

pub fn to_paths(&self, drawable: Drawable<'_>) -> Vec<PathInfo>

Source

pub fn fill_sketch(&self, drawing: &OpSet, options: &RoughOptions) -> PathInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<Fr, To> IntoColor<To> for Fr
where To: FromColor<Fr>,

Source§

fn into_color(self) -> To

Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V