Attributes

Struct Attributes 

Source
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

Source

pub fn new() -> Self

Source

pub fn set_bounding_rectangle_color(&mut self, v: String)

Source

pub fn get_bounding_rectangle_color(&self) -> String

Source

pub fn set_shadow_color(&mut self, v: String) -> String

Source

pub fn get_shadow_color(&self) -> String

Source

pub fn set_color(&mut self, v: String) -> String

Source

pub fn get_color(&self) -> String

Source

pub fn set_clockwise(&mut self, v: bool) -> bool

Source

pub fn get_clockwise(&self) -> bool

Source

pub fn set_filled(&mut self, v: bool) -> bool

Source

pub fn get_filled(&self) -> bool

Source

pub fn set_draw_bounding_rectangle(&mut self, v: bool) -> bool

Source

pub fn get_draw_bounding_rectangle(&self) -> bool

Source

pub fn set_opacity(&mut self, v: u128) -> u128

Source

pub fn get_opacity(&self) -> u128

Source

pub fn set_x(&mut self, v: u128) -> u128

Source

pub fn get_x(&self) -> u128

Source

pub fn set_y(&mut self, v: u128) -> u128

Source

pub fn get_y(&self) -> u128

Source

pub fn set_width(&mut self, v: u128) -> u128

Source

pub fn get_width(&self) -> u128

Source

pub fn set_height(&mut self, v: u128) -> u128

Source

pub fn get_height(&self) -> u128

Source

pub fn set_start_angle(&mut self, v: u128) -> u128

Source

pub fn get_start_angle(&self) -> u128

Source

pub fn set_line_width(&mut self, v: u128) -> u128

Source

pub fn get_line_width(&self) -> u128

Source

pub fn set_shadow_blur(&mut self, v: u128) -> u128

Source

pub fn get_shadow_blur(&self) -> u128

Source

pub fn set_shadow_offset_x(&mut self, v: u128) -> u128

Source

pub fn get_shadow_offset_x(&self) -> u128

Source

pub fn set_shadow_offset_y(&mut self, v: u128) -> u128

Source

pub fn get_shadow_offset_y(&self) -> u128

Source

pub fn set_line_dash_size(&mut self, v: u128) -> u128

Source

pub fn get_line_dash_size(&self) -> u128

Source

pub fn set_line_dash_gap(&mut self, v: u128) -> u128

Source

pub fn get_line_dash_gap(&self) -> u128

Source

pub fn set_bounding_rectangle_padding(&mut self, v: u128) -> u128

Source

pub fn get_bounding_rectangle_padding(&self) -> u128

Trait Implementations§

Source§

impl Debug for Attributes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.