Home > Software engineering >  DirectX coordinates in the problem
DirectX coordinates in the problem

Time:10-01

I create a window, a figure drawn in the window;
And then through the Dinput DeviceState information to get the mouse, move up and down about graphics
DeviceState information in the mouse, are calculated by the incremental,
How to get the coordinates of the mouse in the window, that is, relative to the window coordinates (not through the API)
In the window, the graphic is how to calculate the coordinates of after the mouse to click mobile,??????

CodePudding user response:

Coordinate Space and the Transformation Functions provides
The following functions provides are 2 with coordinate Spaces and transformations.



ClientToScreen
CombineTransform
DPtoLP
GetCurrentPositionEx
GetGraphicsMode
GetMapMode
GetViewportExtEx
GetViewportOrgEx
GetWindowExtEx
GetWindowOrgEx
GetWorldTransform
LPtoDP
MapWindowPoints
ModifyWorldTransform
OffsetViewportOrgEx
OffsetWindowOrgEx
ScaleViewportExtEx
ScaleWindowExtEx
ScreenToClient
SetGraphicsMode
SetMapMode
SetViewportExtEx
SetViewportOrgEx
SetWindowExtEx
SetWindowOrgEx
SetWorldTransform


?
  • Related