prep
This commit is contained in:
1 parent
2ecd15e79f
commit
3f94adf13a
2 files changed
+10
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() {
|
override func layoutSubviews() {
|
||||||
super.layoutSubviews()
|
super.layoutSubviews()
|
||||||
|
let ps = renderPixelSize(self)
|
||||||
|
renderSet(F.reshapePixelSize, ps)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user