NativePointToDeclared maps a point from native desktop coordinates to the declared model-facing coordinate space using the same truncating transform.
(x, y int)
| 101 | // NativePointToDeclared maps a point from native desktop coordinates to the |
| 102 | // declared model-facing coordinate space using the same truncating transform. |
| 103 | func (g DesktopGeometry) NativePointToDeclared(x, y int) (declaredX, declaredY int) { |
| 104 | return scaleDesktopCoordinate(x, g.NativeWidth, g.DeclaredWidth), |
| 105 | scaleDesktopCoordinate(y, g.NativeHeight, g.DeclaredHeight) |
| 106 | } |
| 107 | |
| 108 | func computeDeclaredDesktopSize(nativeWidth, nativeHeight int) (declaredWidth, declaredHeight int) { |
| 109 | if desktopSizeFitsDeclaredLimits(nativeWidth, nativeHeight) { |