pub struct VectorObject {
    pub points: Vec<(f64, f64)>,
    pub fill: GradientImageOrColor,
    pub fill_rule: &'static str,
    pub stroke: GradientImageOrColor,
    pub stroke_width: f64,
    pub line_cap: &'static str,
    pub line_join: &'static str,
    pub subobjects: Vec<VectorObject>,
    pub index: usize,
    pub transform: Option<(f64, f64, f64, f64, f64, f64)>,
}Fields§
§points: Vec<(f64, f64)>§fill: GradientImageOrColor§fill_rule: &'static str§stroke: GradientImageOrColor§stroke_width: f64§line_cap: &'static str§line_join: &'static str§subobjects: Vec<VectorObject>§index: usize§transform: Option<(f64, f64, f64, f64, f64, f64)>Implementations§
Source§impl VectorObject
 
impl VectorObject
pub fn new() -> VectorObject
pub fn get_critical_point(&self, key: (f64, f64)) -> (f64, f64)
pub fn set_transform( &self, transform: (f64, f64, f64, f64, f64, f64), recursive: bool, ) -> Self
pub fn apply_transform( &self, transform: (f64, f64, f64, f64, f64, f64), recursive: bool, ) -> Self
pub fn get_transform(&self) -> Option<(f64, f64, f64, f64, f64, f64)>
pub fn get_transformed_points(&self) -> Vec<(f64, f64)>
pub fn get_fill_opacity(&self) -> f64
pub fn get_stroke_opacity(&self) -> f64
pub fn get_subpaths(&self) -> Vec<Vec<(f64, f64)>>
pub fn get_bounding_box(&self) -> ((f64, f64), (f64, f64))
pub fn get_center(&self) -> (f64, f64)
pub fn get_center_of_mass(&self) -> (f64, f64)
pub fn get_height(&self) -> f64
pub fn get_width(&self) -> f64
pub fn get_cubic_bezier_tuples( &self, ) -> Vec<((f64, f64), (f64, f64), (f64, f64), (f64, f64))>
pub fn set_index(&self, index: usize) -> Self
pub fn merged_points(&self) -> Vec<(f64, f64)>
pub fn increment_index(&self, increment: usize, recursive: bool) -> Self
pub fn apply_function( &self, f: &impl Fn(f64, f64) -> (f64, f64), recursive: bool, about_point: Option<(f64, f64)>, about_edge: Option<(f64, f64)>, ) -> Self
pub fn get_points(&self) -> &Vec<(f64, f64)>
pub fn get_partial_copy( &self, start: f64, end: f64, recursive: bool, ) -> VectorObject
pub fn get_fill(&self) -> GradientImageOrColor
pub fn get_stroke(&self) -> GradientImageOrColor
pub fn get_stroke_width(&self) -> f64
pub fn get_line_cap(&self) -> &'static str
pub fn get_line_join(&self) -> &'static str
pub fn get_subobjects(&self) -> Vec<VectorObject>
pub fn scale(&self, scale_factor: f64, recursive: bool) -> VectorObject
pub fn set_subobject(&self, index: usize, subobject: VectorObject) -> Self
pub fn set_slice_subobjects( &self, start: usize, end: usize, subobjects: Vec<VectorObject>, ) -> Self
pub fn stretch(&self, stretch: (f64, f64), recursive: bool) -> Self
pub fn get_subobject(&self, index: usize) -> VectorObject
pub fn slice_subobjects(&self, start: usize, end: usize) -> Vec<Self>
pub fn shift(&self, shift: (f64, f64), recursive: bool) -> VectorObject
pub fn move_to(&self, position: (f64, f64), recursive: bool) -> VectorObject
pub fn set_fill( &self, fill: GradientImageOrColor, recursive: bool, ) -> VectorObject
pub fn set_fill_opacity(&self, opacity: f64, recursive: bool) -> VectorObject
pub fn set_stroke( &self, stroke: GradientImageOrColor, recursive: bool, ) -> VectorObject
pub fn add(&self, other: &VectorObject) -> Self
pub fn remove(&self, index: usize) -> Self
pub fn set_stroke_opacity(&self, opacity: f64, recursive: bool) -> VectorObject
pub fn set_stroke_width( &self, stroke_width: f64, recursive: bool, ) -> VectorObject
pub fn set_line_cap( &self, line_cap: &'static str, recursive: bool, ) -> VectorObject
pub fn set_line_join(&self, line_join: &'static str, recursive: bool) -> Self
pub fn set_points(&self, points: Vec<(f64, f64)>) -> Self
pub fn set_subobjects(&self, subobjects: Vec<VectorObject>) -> Self
pub fn rotate(&self, angle: f64, recursive: bool) -> Self
pub fn next_to_other( &self, other: &VectorObject, direction: (f64, f64), buff: f64, aligned_edge: (f64, f64), recursive: bool, ) -> Self
pub fn next_to_point( &self, point: (f64, f64), direction: (f64, f64), buff: f64, aligned_edge: (f64, f64), recursive: bool, ) -> VectorObject
pub fn arrange_subobjects( &self, direction: (f64, f64), buff: f64, aligned_edge: (f64, f64), recursive: bool, ) -> Self
pub fn set_background_image( &self, image_base64: String, mime_type: String, width: usize, height: usize, recursive: bool, ) -> Self
pub fn set_fill_image_corners( &self, top_left_corner: (f64, f64), bottom_right_corner: (f64, f64), recursive: bool, ) -> Self
pub fn set_fill_rule(&self, fill_rule: &'static str, recursive: bool) -> Self
pub fn get_fill_rule(&self) -> &'static str
pub fn set_stroke_image_corners( &self, top_left_corner: (f64, f64), bottom_right_corner: (f64, f64), recursive: bool, ) -> Self
pub fn get_fill_image_corners(&self) -> ((f64, f64), (f64, f64))
pub fn get_stroke_image_corners(&self) -> ((f64, f64), (f64, f64))
pub fn get_pieces(&self, n_pieces: usize) -> VectorObject
Trait Implementations§
Source§impl Clone for VectorObject
 
impl Clone for VectorObject
Source§fn clone(&self) -> VectorObject
 
fn clone(&self) -> VectorObject
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 moreAuto Trait Implementations§
impl Freeze for VectorObject
impl RefUnwindSafe for VectorObject
impl Send for VectorObject
impl Sync for VectorObject
impl Unpin for VectorObject
impl UnwindSafe for VectorObject
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 more