DeclaredPointToNative maps a point from declared model-facing coordinates to native desktop coordinates using the existing pixel-center truncation rule.
(x, y int)
| 94 | // DeclaredPointToNative maps a point from declared model-facing coordinates to |
| 95 | // native desktop coordinates using the existing pixel-center truncation rule. |
| 96 | func (g DesktopGeometry) DeclaredPointToNative(x, y int) (nativeX, nativeY int) { |
| 97 | return scaleDesktopCoordinate(x, g.DeclaredWidth, g.NativeWidth), |
| 98 | scaleDesktopCoordinate(y, g.DeclaredHeight, g.NativeHeight) |
| 99 | } |
| 100 | |
| 101 | // NativePointToDeclared maps a point from native desktop coordinates to the |
| 102 | // declared model-facing coordinate space using the same truncating transform. |