equal
deleted
inserted
replaced
164 |
164 |
165 impl Rect { |
165 impl Rect { |
166 #[inline] |
166 #[inline] |
167 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Self { |
167 pub fn new(x: i32, y: i32, width: u32, height: u32) -> Self { |
168 Self { x, y, width, height } |
168 Self { x, y, width, height } |
|
169 } |
|
170 |
|
171 #[inline] |
|
172 pub fn size(&self) -> Size { |
|
173 Size::new(self.width as usize, self.height as usize) |
|
174 } |
|
175 |
|
176 #[inline] |
|
177 pub fn area(&self) -> usize { |
|
178 self.size().area() |
169 } |
179 } |
170 } |
180 } |
171 |
181 |
172 |
182 |
173 pub struct LinePoints { |
183 pub struct LinePoints { |