[][src]Struct digital_ink_library::sketch::Sketch

pub struct Sketch {
    pub typ: String,
    pub meta: HashMap<String, Value>,
    pub strokes: Vec<Stroke>,
}

Fields

typ: Stringmeta: HashMap<String, Value>strokes: Vec<Stroke>

Methods

impl Sketch[src]

pub fn new(strokes: Vec<Stroke>) -> Sketch[src]

pub fn strokes(&self) -> &Vec<Stroke>[src]

pub fn add_stroke(&mut self, stroke: Stroke)[src]

pub fn x_min(&self) -> f64[src]

pub fn x_max(&self) -> f64[src]

pub fn y_min(&self) -> f64[src]

pub fn y_max(&self) -> f64[src]

pub fn timestamp_min(&self) -> u64[src]

pub fn timestamp_max(&self) -> u64[src]

pub fn pressure_min(&self) -> f64[src]

pub fn pressure_max(&self) -> f64[src]

pub fn len(&self) -> usize[src]

pub fn offset(&mut self, x_offset: Option<f64>, y_offset: Option<f64>)[src]

Offset the x/y coordinates by a given offset

pub fn scale(&mut self, x_factor: Option<f64>, y_factor: Option<f64>)[src]

Scale the x/y coordinates by a given factor

pub fn normalize(&mut self, new_size: f64, keep_aspect_ratio: bool)[src]

Normalize the stroke into a maximum dimension

pub fn remove_duplicate_dots(&mut self)[src]

pub fn remove_single_dot_strokes(&mut self)[src]

Trait Implementations

impl Debug for Sketch[src]

impl<'de> Deserialize<'de> for Sketch[src]

impl Display for Sketch[src]

impl Eq for Sketch[src]

impl PartialEq<Sketch> for Sketch[src]

impl Serialize for Sketch[src]

Auto Trait Implementations

impl RefUnwindSafe for Sketch

impl Send for Sketch

impl Sync for Sketch

impl Unpin for Sketch

impl UnwindSafe for Sketch

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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