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

Method scale

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

Source from the content-addressed store, hash-verified

71 }
72
73 pub fn scale(self) -> f64 {
74 let s = unsafe { BackingScaleFactor() as _ };
75 if s > 1. {
76 let enable_retina = super::ENABLE_RETINA.lock().unwrap().clone();
77 if enable_retina {
78 return s;
79 }
80 }
81 1.
82 }
83
84 pub fn bounds(self) -> CGRect {
85 unsafe { CGDisplayBounds(self.0) }

Callers 2

widthMethod · 0.45
heightMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected