Rectangles |
Throughout Microsoft Direct3D and Microsoft Windows programming, objects on the screen are referred to in terms of bounding rectangles. The sides of a bounding rectangle are always parallel to the sides of the screen. Managed code applications should use the Rectangle structure, in the System.Drawing namespace, for storing rectangle information and when blitting to the screen or performing collision detection.
Most unmanaged C++ applications use the RECT structure, which requires the (x,y) coordinates of the rectangle's upper-left and lower-right corners. A managed code application typically supplies Rectangle properties that indicate the (x,y) coordinates of the rectangle's upper-left corner, and its height and width, as shown in the following diagram.
In the interest of efficiency, consistency, and ease of use, all Direct3D presentation functions work with rectangles.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center