[−][src]Struct digital_ink_library::sketch::Sketch
Fields
typ: String
meta: 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]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,