home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / gdi / winnt / wxform / readme.txt < prev    next >
Text File  |  1996-01-17  |  2KB  |  40 lines

  1. World Coordinate Transformation
  2.  
  3.  
  4. SUMMARY
  5. =======
  6.  
  7. The WXFORM sample provides a demonstration of the new world-coordinate 
  8. transformation. This sample displays a rectangle in world coordinates and a 
  9. matrix containing the transform values. Users can directly manipulate the 
  10. rectangle and see the effect on the transformation, or they can set the 
  11. transformation and see the effect on the rectangle.
  12.  
  13. MORE INFORMATION
  14. ================
  15.  
  16. The program begins by setting the viewport origin to the center of the 
  17. client area. It then draws a rectangle in world-coordinate space from the 
  18. point (0, 0) to the point (100, 100). You can directly manipulate this 
  19. rectangle by using the left and right mouse buttons. Specific actions are 
  20. described more fully in the "Direct Manipulation Help" dialog box.
  21.  
  22. There is a second dialog box titled "World Transform." This shows the values 
  23. of the eM11, eM12, eM21, eM22, eDx, and eDy fields in the XFORM structure 
  24. retrieved by calling the GetWorldTransform function. By choosing the buttons 
  25. on this dialog box, the user can cause the program to call the 
  26. SetWorldTransform function.
  27.  
  28. There are three coordinate systems of interest in this sample. The first one 
  29. is the world-coordinate system, which is new to Win32. These points are 
  30. ultimately mapped to the second coordinate system, device coordinates, 
  31. before being painted in the window. This program must also use a third 
  32. coordinate system, screen coordinates, for certain interactions with the 
  33. mouse pointer.
  34.  
  35. There is a third dialog box titled "Mouse Position" that shows the location 
  36. of the cursor in all three coordinate systems. The device coordinates are 
  37. relative to the upper-left corner of the client area. They are not relative 
  38. to the viewport origin.
  39.  
  40.