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

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

Added ODIn lic header with ID to all files where missing

Cleaned up Surface handling by movefing colorfill and
colorconversion into own files and use functionpointers
setup during creation.

updated makefile to add files

removed inhertiance from IBASE in DDrectangle class

File size: 1.3 KB
Line 
1/* $Id: rectangle.h,v 1.4 1999-12-21 01:28:19 hugh 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.