pub struct Rectangle {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub fill: Option<&'static str>,
pub stroke: Option<&'static str>,
pub stroke_width: Option<f32>,
pub rx: Option<f32>,
pub ry: Option<f32>,
pub opacity: Option<f32>,
pub id: Option<&'static str>,
pub class: Option<&'static str>,
}Expand description
Rectangle SVG element (<rect>).
See also: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/rect
Draws rectangles, defined by their position, width, and height. The rectangles may have their corners rounded. SVG Tutorial: SVG Basic Shape.
Fields§
§x: f32§y: f32§width: f32§height: f32§fill: Option<&'static str>§stroke: Option<&'static str>§stroke_width: Option<f32>§rx: Option<f32>§ry: Option<f32>§opacity: Option<f32>§id: Option<&'static str>§class: Option<&'static str>Implementations§
Source§impl Rectangle
impl Rectangle
pub fn new(x: f32, y: f32, width: f32, height: f32) -> Self
pub fn x(self, value: f32) -> Self
pub fn y(self, value: f32) -> Self
pub fn width(self, value: f32) -> Self
pub fn height(self, value: f32) -> Self
pub fn fill(self, value: &'static str) -> Self
pub fn stroke(self, value: &'static str) -> Self
pub fn stroke_width(self, value: f32) -> Self
pub fn rx(self, value: f32) -> Self
pub fn ry(self, value: f32) -> Self
pub fn opacity(self, value: f32) -> Self
pub fn id(self, value: &'static str) -> Self
pub fn class(self, value: &'static str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rectangle
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnwindSafe for Rectangle
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