Support iOS for ogs-blue #7
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import UIKit
|
||||
|
||||
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]
|
||||
}
|
||||
@@ -23,6 +23,8 @@ final class RenderGLView: UIView {
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
let ps = renderPixelSize(self)
|
||||
renderSet(F.reshapePixelSize, ps)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user