(self)
| 35 | } |
| 36 | |
| 37 | pub fn width(self) -> usize { |
| 38 | let w = unsafe { CGDisplayPixelsWide(self.0) }; |
| 39 | let s = self.scale(); |
| 40 | if s > 1.0 { |
| 41 | ((w as f64) * s).round() as usize |
| 42 | } else { |
| 43 | w |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | pub fn height(self) -> usize { |
| 48 | let h = unsafe { CGDisplayPixelsHigh(self.0) }; |