13 lines
343 B
Swift
13 lines
343 B
Swift
import UIKit
|
|
|
|
func renderDraw(_ vm: RenderVM) {
|
|
raybriRender(vm.pixelSize[0], vm.pixelSize[1])
|
|
}
|
|
|
|
func renderPixelSize(_ view: UIView) -> [Int32] {
|
|
let scale = view.contentScaleFactor
|
|
let w = Int32(max(1, (view.bounds.width * scale).rounded()))
|
|
let h = Int32(max(1, (view.bounds.height * scale).rounded()))
|
|
return [w, h]
|
|
}
|