xref: /haiku/src/tests/kits/interface/bpolygon/DummyPolygon.h (revision f7081347c543247e2c28d08eb3b036ad49b42e22)
1*f7081347Sjrand /*
2*f7081347Sjrand 	$Id: DummyPolygon.h,v 1.1 2002/11/23 04:42:57 jrand Exp $
3*f7081347Sjrand 
4*f7081347Sjrand 	This file contains the definition of a dummy BPolygon class.
5*f7081347Sjrand 	It is used in order to get access to the private points of the
6*f7081347Sjrand 	BPolygon.  The BPolygon class itself does not allow you to extract
7*f7081347Sjrand 	these points.
8*f7081347Sjrand 
9*f7081347Sjrand 	This is a hack in order to properly test BPolygon.  It is highly
10*f7081347Sjrand 	dependent on the private structure of BPolygon and is likely to break
11*f7081347Sjrand 	if this structure is changed substantially in the future.  However,
12*f7081347Sjrand 	it is the only effective way to test BPolygon.
13*f7081347Sjrand 
14*f7081347Sjrand 	*/
15*f7081347Sjrand 
16*f7081347Sjrand #ifndef DUMMYPOLYGON_H
17*f7081347Sjrand #define DUMMYPOLYGON_H
18*f7081347Sjrand 
19*f7081347Sjrand 
20*f7081347Sjrand #include <Rect.h>
21*f7081347Sjrand 
22*f7081347Sjrand 
23*f7081347Sjrand class BPoint;
24*f7081347Sjrand 
25*f7081347Sjrand 
26*f7081347Sjrand class DummyPolygon {
27*f7081347Sjrand 
28*f7081347Sjrand public:
29*f7081347Sjrand 	DummyPolygon();
30*f7081347Sjrand 	virtual ~DummyPolygon();
31*f7081347Sjrand 
32*f7081347Sjrand 	const BPoint *GetPoints(void);
33*f7081347Sjrand 
34*f7081347Sjrand /*----- Private or reserved -----------------------------------------*/
35*f7081347Sjrand private:
36*f7081347Sjrand                 BRect   fBounds;
37*f7081347Sjrand                 int32   fCount;
38*f7081347Sjrand                 BPoint  *fPts;
39*f7081347Sjrand };
40*f7081347Sjrand 
41*f7081347Sjrand #endif	// DUMMYPOLYGON_H
42*f7081347Sjrand 
43*f7081347Sjrand 
44*f7081347Sjrand 
45*f7081347Sjrand 
46*f7081347Sjrand 
47*f7081347Sjrand 
48