pub struct Rectangle {
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
pub style: Style,
pub border_radius: f32,
pub comment: Option<Comment>,
}
Expand description
<rect x="{x}" y="{y}" width="{w}" height="{h}" ... />
,
Fields§
§x: f32
§y: f32
§w: f32
§h: f32
§style: Style
§border_radius: f32
§comment: Option<Comment>
Implementations§
source§impl Rectangle
impl Rectangle
pub fn fill<F>(self, fill: F) -> Self
pub fn stroke<S>(self, stroke: S) -> Self
pub fn opacity(self, opacity: f32) -> Self
pub fn stroke_opacity(self, opacity: f32) -> Self
pub fn style(self, style: Style) -> Self
pub fn border_radius(self, r: f32) -> Self
pub fn offset(self, dx: f32, dy: f32) -> Self
pub fn inflate(self, dx: f32, dy: f32) -> Self
pub fn comment(self, text: &str) -> Self
Trait Implementations§
impl StructuralPartialEq for Rectangle
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)