Make UEFI boot-platform build again
[haiku.git] / headers / os / interface / Shape.h
blobc675ae821398e50a8efb9af8942c3b6b60691fba
1 /*
2 * Copyright 2002-2010 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _SHAPE_H
6 #define _SHAPE_H
9 #include <Archivable.h>
12 class BPoint;
13 class BRect;
14 class BShape;
16 namespace BPrivate {
17 class ServerLink;
18 class PicturePlayer;
22 class BShapeIterator {
23 public:
24 BShapeIterator();
25 virtual ~BShapeIterator();
27 virtual status_t IterateMoveTo(BPoint* point);
28 virtual status_t IterateLineTo(int32 lineCount,
29 BPoint* linePoints);
30 virtual status_t IterateBezierTo(int32 bezierCount,
31 BPoint* bezierPoints);
32 virtual status_t IterateClose();
34 virtual status_t IterateArcTo(float& rx, float& ry,
35 float& angle, bool largeArc,
36 bool counterClockWise, BPoint& point);
38 status_t Iterate(BShape* shape);
40 private:
41 virtual void _ReservedShapeIterator2();
42 virtual void _ReservedShapeIterator3();
43 virtual void _ReservedShapeIterator4();
45 uint32 reserved[4];
49 class BShape : public BArchivable {
50 public:
51 BShape();
52 BShape(const BShape& other);
53 BShape(BMessage* archive);
54 virtual ~BShape();
56 static BArchivable* Instantiate(BMessage* archive);
57 virtual status_t Archive(BMessage* archive,
58 bool deep = true) const;
60 BShape& operator=(const BShape& other);
62 bool operator==(const BShape& other) const;
63 bool operator!=(const BShape& other) const;
65 void Clear();
66 BRect Bounds() const;
67 BPoint CurrentPosition() const;
69 status_t AddShape(const BShape* other);
71 status_t MoveTo(BPoint point);
72 status_t LineTo(BPoint linePoint);
73 status_t BezierTo(BPoint controlPoints[3]);
74 status_t BezierTo(const BPoint& control1,
75 const BPoint& control2,
76 const BPoint& endPoint);
77 status_t ArcTo(float rx, float ry,
78 float angle, bool largeArc,
79 bool counterClockWise,
80 const BPoint& point);
81 status_t Close();
83 private:
84 // FBC padding
85 virtual status_t Perform(perform_code code, void* data);
87 virtual void _ReservedShape1();
88 virtual void _ReservedShape2();
89 virtual void _ReservedShape3();
90 virtual void _ReservedShape4();
92 private:
93 friend class BShapeIterator;
94 friend class BView;
95 friend class BFont;
96 friend class BPrivate::PicturePlayer;
97 friend class BPrivate::ServerLink;
99 void GetData(int32* opCount, int32* ptCount,
100 uint32** opList, BPoint** ptList);
101 void SetData(int32 opCount, int32 ptCount,
102 const uint32* opList,
103 const BPoint* ptList);
104 void InitData();
105 bool AllocatePts(int32 count);
106 bool AllocateOps(int32 count);
108 private:
109 uint32 fState;
110 uint32 fBuildingOp;
111 void* fPrivateData;
113 uint32 reserved[4];
117 #endif // _SHAPE_H