pub struct Attributes { /* private fields */ }Expand description
The ‘Attributes’ struct has all the attributes that any object in my library can have. Using these attributes we can animate the object. For example if we change the ‘x’ and ‘y’ of an element its position will change. Each attribute has its own get and set functions eg ‘get_color’ and ‘set_color’ for ‘color’ attributes. when the library becomes more complex all the logic for changing attributes will be placed in these getter and setter functions.
Implementations§
Source§impl Attributes
impl Attributes
pub fn new() -> Self
pub fn set_bounding_rectangle_color(&mut self, v: String)
pub fn get_bounding_rectangle_color(&self) -> String
pub fn set_shadow_color(&mut self, v: String) -> String
pub fn get_shadow_color(&self) -> String
pub fn set_color(&mut self, v: String) -> String
pub fn get_color(&self) -> String
pub fn set_clockwise(&mut self, v: bool) -> bool
pub fn get_clockwise(&self) -> bool
pub fn set_filled(&mut self, v: bool) -> bool
pub fn get_filled(&self) -> bool
pub fn set_draw_bounding_rectangle(&mut self, v: bool) -> bool
pub fn get_draw_bounding_rectangle(&self) -> bool
pub fn set_opacity(&mut self, v: u128) -> u128
pub fn get_opacity(&self) -> u128
pub fn set_x(&mut self, v: u128) -> u128
pub fn get_x(&self) -> u128
pub fn set_y(&mut self, v: u128) -> u128
pub fn get_y(&self) -> u128
pub fn set_width(&mut self, v: u128) -> u128
pub fn get_width(&self) -> u128
pub fn set_height(&mut self, v: u128) -> u128
pub fn get_height(&self) -> u128
pub fn set_start_angle(&mut self, v: u128) -> u128
pub fn get_start_angle(&self) -> u128
pub fn set_line_width(&mut self, v: u128) -> u128
pub fn get_line_width(&self) -> u128
pub fn set_shadow_blur(&mut self, v: u128) -> u128
pub fn get_shadow_blur(&self) -> u128
pub fn set_shadow_offset_x(&mut self, v: u128) -> u128
pub fn get_shadow_offset_x(&self) -> u128
pub fn set_shadow_offset_y(&mut self, v: u128) -> u128
pub fn get_shadow_offset_y(&self) -> u128
pub fn set_line_dash_size(&mut self, v: u128) -> u128
pub fn get_line_dash_size(&self) -> u128
pub fn set_line_dash_gap(&mut self, v: u128) -> u128
pub fn get_line_dash_gap(&self) -> u128
pub fn set_bounding_rectangle_padding(&mut self, v: u128) -> u128
pub fn get_bounding_rectangle_padding(&self) -> u128
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
Blanket Implementations§
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