source: trunk/src/ddraw/rectangle.h@ 2013

Last change on this file since 2013 was 405, checked in by hugh, 26 years ago

Fixed bug in locked region handling

File size: 1.1 KB
Line 
1#ifndef __DDRectandle
2 #define __DDRectandle
3
4#include <ibase.hpp>
5
6class DDRectangle : public IBase {
7typedef IBase
8 Inherited;
9public:
10/*------------------------------ Related Types -------------------------------*/
11 typedef long Coord;
12
13/*------------------------------- Constructors -------------------------------*/
14 DDRectangle ( );
15
16
17 DDRectangle ( Coord point1X,
18 Coord point1Y,
19 Coord point2X,
20 Coord point2Y );
21
22
23/*------------------------------- Comparisons --------------------------------*/
24Boolean
25 operator == ( const DDRectangle& rectangle ) const,
26 operator != ( const DDRectangle& rectangle ) const;
27
28/*--------------------------------- Testing ----------------------------------*/
29Boolean
30 intersects ( const DDRectangle& rectangle ) const;
31
32Coord
33 width() const,
34 height() const,
35 Top() const,
36 Left() const,
37 Bottom() const,
38 Right() const;
39
40 void* GetMemPtr();
41 void SetMemPtr(void* NewMemPtr);
42
43private:
44 void* pMemPtr; // Pointer to surface memory for this rectangle
45 long lTop,lLeft;
46 long lBottom,lRight;
47}; // class DDRectangle
48
49#endif
Note: See TracBrowser for help on using the repository browser.