source: trunk/src/ddraw/new/rectangle.h@ 10367

Last change on this file since 10367 was 3345, checked in by mike, 25 years ago

Experimental fullscreen DDraw

File size: 1.3 KB
Line 
1/* $Id: rectangle.h,v 1.1 2000-04-07 18:21:14 mike Exp $ */
2
3/*
4 * Rectangle class used to keep track of locked rects in surfaces
5 *
6 * Copyright 1999 Markus Montkowski
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11
12#ifndef __DDRectandle
13 #define __DDRectandle
14
15class DDRectangle {
16public:
17/*------------------------------ Related Types -------------------------------*/
18 typedef long Coord;
19
20/*------------------------------- Constructors -------------------------------*/
21 DDRectangle ( );
22
23
24 DDRectangle ( Coord point1X,
25 Coord point1Y,
26 Coord point2X,
27 Coord point2Y );
28
29
30/*------------------------------- Comparisons --------------------------------*/
31BOOL
32 operator == ( const DDRectangle& rectangle ) const,
33 operator != ( const DDRectangle& rectangle ) const;
34
35/*--------------------------------- Testing ----------------------------------*/
36BOOL
37 intersects ( const DDRectangle& rectangle ) const;
38
39Coord
40 width() const,
41 height() const,
42 Top() const,
43 Left() const,
44 Bottom() const,
45 Right() const;
46
47 void* GetMemPtr();
48 void SetMemPtr(void* NewMemPtr);
49
50private:
51 void* pMemPtr; // Pointer to surface memory for this rectangle
52 long lTop,lLeft;
53 long lBottom,lRight;
54}; // class DDRectangle
55
56#endif
Note: See TracBrowser for help on using the repository browser.