deds_rect.htm 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
  2. <html><head>
  3. <title>rect</title>
  4. </head><body>
  5. <p>[<a href="mxdoc.htm">mainpage</a>]
  6. [<a href="tags.htm">tags</a>]<br>
  7. <h1><a name="rect">module: rect</a></h1><p><b>Basic rectangle handling</b><p>
  8. This module contains typedefs, functions and macros for handling
  9. rectangles. Also included are macros to determine intersections and unions
  10. areas.
  11. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p>Part of the <a href="deds.htm">deds</a> library.<ul><li>
  12. <a name="MX_RECT"><code>MX_RECT</code></a>
  13. <p>
  14. <p><b>A basic rectangle</b><p>
  15. This type is a basic rectangle with an upper-left at x1,y1 and
  16. lower-right at x2, y2.
  17. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)
  18. <p>member: <b>
  19. int x1</b> Left coordinate
  20. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)
  21. <p>member: <b>
  22. int y1</b> Upper coordinate
  23. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)
  24. <p>member: <b>
  25. int x2</b> Right coordinate
  26. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)
  27. <p>member: <b>
  28. int y2</b> Lower coordinate
  29. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p></li>
  30. <li>
  31. <a name=" define MXRECT_VALID(A)"><code># define MXRECT_VALID(A)</code></a>
  32. <p>
  33. <p><b>Is MX_RECT valid?</b><p>
  34. This macro returns non-zero if the upper-left of the rectangle is
  35. above and to the right of the lower-left of the rectangle, zero otherwise.
  36. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p></li>
  37. <li>
  38. <a name=" define MXRECT_INTERSECT(A, B, R)"><code># define MXRECT_INTERSECT(A, B, R)</code></a>
  39. <p>
  40. <p><b>Find intersection of two rectangles</b><p>
  41. This macro finds the intersection of two rectangles.
  42. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p></li>
  43. <li>
  44. <a name=" define MXRECT_UNION(A, B, R)"><code># define MXRECT_UNION(A, B, R)</code></a>
  45. <p>
  46. <p><b>Union of two rectangles. </b><p>
  47. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p></li>
  48. <li>
  49. <a name=" define MXRECT_CONTAINS(R, X, Y)"><code># define MXRECT_CONTAINS(R, X, Y)</code></a>
  50. <p>
  51. <p><b>Point contained in MX_RECT</b><p>
  52. This macro return non-zero if a given x,y point is indose the
  53. rectangel error, zero otherwise.
  54. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p></li>
  55. <li>
  56. <a name=" define MXRECTS_OVERLAP(A, B)"><code># define MXRECTS_OVERLAP(A, B)</code></a>
  57. <p>
  58. <p><b>Do MX_RECT overlap?</b><p>
  59. This macro return non-zero if two rectangels overlap, zero otherwise.
  60. (<a href="../include/deds/rect.h">../include/deds/rect.h</a>)<p></li>
  61. <li>
  62. <a name="void mx_rect_move(MX_RECT* rrect, int x, int y)"><code>void mx_rect_move(MX_RECT* rrect, int x, int y)</code></a>
  63. <p>
  64. <p><b>Move a MX_RECT</b><p>
  65. This function moves a MX_REXT so that the upper left of the rectangle
  66. is at a given x,y, position. The size of the rectangle is not changed.
  67. (<a href="../include/deds/rect.c">../include/deds/rect.c</a>)<p></li>
  68. <li>
  69. <a name="void mx_rect_resize(MX_RECT* rrect, int w, int h)"><code>void mx_rect_resize(MX_RECT* rrect, int w, int h)</code></a>
  70. <p>
  71. <p><b>Resize a MX_RECT</b><p>
  72. This function resizes a MX_REXT to a given size. The upper left point
  73. of the rectangle does not change.
  74. (<a href="../include/deds/rect.c">../include/deds/rect.c</a>)<p></li>
  75. </ul><p>Generated by <a href="http://www.deleveld.dds.nl/mxdoc/index.htm">MXDOC</a> 2.2 on Sun Feb 4 15:16:26 2007
  76. </body></html>