MCPcopy Create free account
hub / github.com/Recordscript/recordscript / width

Method width

libs/scrap/src/quartz/display.rs:37–45  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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) };

Callers

nothing calls this directly

Calls 1

scaleMethod · 0.45

Tested by

no test coverage detected