9 lines
221 B
Swift
9 lines
221 B
Swift
import AppKit
|
|
|
|
func renderPixelSize(_ view: NSView) -> [Int32] {
|
|
let backing = view.convertToBacking(view.bounds)
|
|
let w = Int32(max(1, backing.width))
|
|
let h = Int32(max(1, backing.height))
|
|
return [w, h]
|
|
}
|