nominal_api/conjure/objects/scout/layout/api/
canvas_rect.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 conjure_object::private::DeriveWith,
7 Copy
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct CanvasRect {
14 #[serde(rename = "x")]
15 #[derive_with(with = conjure_object::private::DoubleWrapper)]
16 x: f64,
17 #[serde(rename = "y")]
18 #[derive_with(with = conjure_object::private::DoubleWrapper)]
19 y: f64,
20 #[serde(rename = "width")]
21 #[derive_with(with = conjure_object::private::DoubleWrapper)]
22 width: f64,
23 #[serde(rename = "height")]
24 #[derive_with(with = conjure_object::private::DoubleWrapper)]
25 height: f64,
26}
27impl CanvasRect {
28 #[inline]
29 pub fn x(&self) -> f64 {
30 self.x
31 }
32 #[inline]
33 pub fn y(&self) -> f64 {
34 self.y
35 }
36 #[inline]
37 pub fn width(&self) -> f64 {
38 self.width
39 }
40 #[inline]
41 pub fn height(&self) -> f64 {
42 self.height
43 }
44}