This commit is contained in:
Михаил Капелько committed 2026-10-28 16:56:50 +03:00
1 parent 2ecd15e79f
commit 3f94adf13a
2 files changed
+10

No files matched your search

+8
View File
@@ -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)
}
}