WinSizeFromPix returns window manager size units (where DevicePixelRatio is ignored) converted from pixel units -- i.e., divide by DevicePixelRatio
(sz image.Point)
| 163 | // (where DevicePixelRatio is ignored) converted from pixel units -- |
| 164 | // i.e., divide by DevicePixelRatio |
| 165 | func (sc *Screen) WinSizeFromPix(sz image.Point) image.Point { |
| 166 | var wsz image.Point |
| 167 | wsz.X = int(float32(sz.X) / sc.DevicePixelRatio) |
| 168 | wsz.Y = int(float32(sz.Y) / sc.DevicePixelRatio) |
| 169 | return wsz |
| 170 | } |
| 171 | |
| 172 | // ConstrainWinGeom constrains window geometry to fit in the screen. |
| 173 | // Size is in pixel units. |
no outgoing calls
no test coverage detected