pub struct WasmVectorObject {
pub native_vec_features: VectorObject,
}
Fields§
§native_vec_features: VectorObject
Implementations§
Source§impl WasmVectorObject
impl WasmVectorObject
pub fn new() -> WasmVectorObject
pub fn get_index(&self) -> usize
pub fn increment_index(&self, increment: usize, recursive: bool) -> Self
pub fn get_points(&self) -> Array
pub fn add(&self, new_subobject: WasmVectorObject) -> Self
pub fn remove(&self, index: usize) -> Self
pub fn get_subobject(&self, index: usize) -> WasmVectorObject
pub fn slice_subobjects( &self, start: usize, end: usize, ) -> Vec<WasmVectorObject>
pub fn set_subobject( &self, index: usize, new_subobject: WasmVectorObject, ) -> Self
pub fn set_slice_subobjects( &self, start: usize, end: usize, new_subobjects: Vec<WasmVectorObject>, ) -> Self
pub fn get_fill(&self) -> WasmGradientImageOrColor
pub fn get_stroke(&self) -> WasmGradientImageOrColor
pub fn get_subobjects_recursively( &self, with_points: Option<bool>, ) -> Vec<WasmVectorObject>
pub fn get_subcurve(&self, start: f64, end: f64) -> Self
pub fn get_stroke_width(&self) -> f64
pub fn get_line_cap(&self) -> String
pub fn get_line_join(&self) -> String
pub fn get_partial_copy(&self, start: f64, end: f64, recursive: bool) -> Self
pub fn get_nth_curve_points(&self, n: usize) -> Array
pub fn get_nth_curve_length_pieces( &self, n: usize, sample_points: Option<usize>, ) -> Vec<f64>
pub fn get_num_curves(&self) -> usize
pub fn is_closed(&self) -> bool
pub fn get_subpaths(&self) -> Array
pub fn apply_function( &self, function: &Function, recursive: bool, about_point: Option<Array>, about_edge: Option<Array>, ) -> Self
pub fn get_pieces(&self, n_pieces: usize) -> WasmVectorObject
pub fn get_cubic_bezier_tuples(&self) -> Array
pub fn get_subobjects(&self) -> Vec<WasmVectorObject>
pub fn scale(&self, factor: f64, recursive: bool) -> Self
pub fn stretch(&self, x_factor: f64, y_factor: f64, recursive: bool) -> Self
pub fn shift(&self, x_shift: f64, y_shift: f64, recursive: bool) -> Self
pub fn merged_points(&self) -> Array
pub fn get_bounding_box(&self) -> Array
pub fn get_center(&self) -> Array
pub fn get_center_of_mass(&self) -> Array
pub fn get_height(&self) -> f64
pub fn get_width(&self) -> f64
pub fn set_index(&self, index: usize) -> Self
pub fn set_fill(&self, fill: WasmGradientImageOrColor, recursive: bool) -> Self
pub fn set_fill_opacity(&self, opacity: f64, recursive: bool) -> Self
pub fn set_fill_rule(&self, fill_rule: String, recursive: bool) -> Self
pub fn move_to(&self, x: f64, y: f64, recursive: bool) -> Self
pub fn get_fill_rule(&self) -> String
pub fn set_stroke( &self, stroke: WasmGradientImageOrColor, recursive: bool, ) -> Self
pub fn set_stroke_opacity(&self, opacity: f64, recursive: bool) -> Self
pub fn set_stroke_width(&self, width: f64, recursive: bool) -> Self
pub fn set_line_cap(&self, line_cap: String, recursive: bool) -> Self
pub fn set_line_join(&self, line_join: String, recursive: bool) -> Self
pub fn set_points(&self, points: Array) -> Self
pub fn set_subobjects(&self, subobjects: Vec<WasmVectorObject>) -> Self
pub fn rotate(&self, angle: f64, recursive: bool) -> Self
pub fn get_critical_point(&self, key_x: f64, key_y: f64) -> Array
pub fn get_fill_opacity(&self) -> f64
pub fn get_stroke_opacity(&self) -> f64
pub fn match_style(&self, other: WasmVectorObject) -> Self
pub fn next_to_other( &self, other: WasmVectorObject, direction: Array, buff: f64, aligned_edge: Array, recursive: bool, ) -> Self
pub fn arrange_subobjects( &self, direction: Array, buff: f64, aligned_edge: Array, recursive: bool, ) -> Self
pub fn next_to_point( &self, point: Array, direction: Array, buff: f64, aligned_edge: Array, recursive: bool, ) -> Self
pub fn clone_js(&self) -> Self
Trait Implementations§
Source§impl AsRef<JsValue> for WasmVectorObject
impl AsRef<JsValue> for WasmVectorObject
Source§impl Clone for WasmVectorObject
impl Clone for WasmVectorObject
Source§fn clone(&self) -> WasmVectorObject
fn clone(&self) -> WasmVectorObject
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WasmVectorObject
impl Debug for WasmVectorObject
Source§impl From<WasmVectorObject> for JsValue
impl From<WasmVectorObject> for JsValue
Source§fn from(value: WasmVectorObject) -> Self
fn from(value: WasmVectorObject) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmVectorObject
impl FromWasmAbi for WasmVectorObject
Source§impl IntoWasmAbi for WasmVectorObject
impl IntoWasmAbi for WasmVectorObject
Source§impl JsCast for WasmVectorObject
impl JsCast for WasmVectorObject
Source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
Performs a dynamic
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moreSource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
Source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
Source§fn has_type<T>(&self) -> boolwhere
T: JsCast,
fn has_type<T>(&self) -> boolwhere
T: JsCast,
Test whether this JS value has a type
T
. Read moreSource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
Performs a dynamic cast (checked at runtime) of this value into the
target type
T
. Read moreSource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
Performs a dynamic cast (checked at runtime) of this value into the
target type
T
. Read moreSource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
Performs a zero-cost unchecked cast into the specified type. Read more
Source§fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
Performs a zero-cost unchecked cast into a reference to the specified
type. Read more
Source§impl OptionFromWasmAbi for WasmVectorObject
impl OptionFromWasmAbi for WasmVectorObject
Source§impl OptionIntoWasmAbi for WasmVectorObject
impl OptionIntoWasmAbi for WasmVectorObject
Source§impl RefFromWasmAbi for WasmVectorObject
impl RefFromWasmAbi for WasmVectorObject
Source§type Anchor = RcRef<WasmVectorObject>
type Anchor = RcRef<WasmVectorObject>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for WasmVectorObject
impl RefMutFromWasmAbi for WasmVectorObject
Source§impl TryFromJsValue for WasmVectorObject
impl TryFromJsValue for WasmVectorObject
Source§impl VectorFromWasmAbi for WasmVectorObject
impl VectorFromWasmAbi for WasmVectorObject
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmVectorObject]>
Source§impl VectorIntoJsValue for WasmVectorObject
impl VectorIntoJsValue for WasmVectorObject
fn vector_into_jsvalue(vector: Box<[WasmVectorObject]>) -> JsValue
Source§impl VectorIntoWasmAbi for WasmVectorObject
impl VectorIntoWasmAbi for WasmVectorObject
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmVectorObject]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmVectorObject
impl WasmDescribeVector for WasmVectorObject
Auto Trait Implementations§
impl Freeze for WasmVectorObject
impl RefUnwindSafe for WasmVectorObject
impl Send for WasmVectorObject
impl Sync for WasmVectorObject
impl Unpin for WasmVectorObject
impl UnwindSafe for WasmVectorObject
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.