2 * Copyright 2003-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
17 /* Integer rect used to define a clipping rectangle. All bounds are inclusive. */
18 /* Moved from DirectWindow.h */
30 BRegion(const BRegion
& other
);
31 BRegion(const BRect rect
);
34 BRegion
& operator=(const BRegion
& other
);
35 bool operator==(const BRegion
& other
) const;
38 void Set(clipping_rect clipping
);
41 clipping_rect
FrameInt() const;
43 BRect
RectAt(int32 index
);
44 BRect
RectAt(int32 index
) const;
45 clipping_rect
RectAtInt(int32 index
);
46 clipping_rect
RectAtInt(int32 index
) const;
49 int32
CountRects() const;
51 bool Intersects(BRect rect
) const;
52 bool Intersects(clipping_rect clipping
) const;
54 bool Contains(BPoint point
) const;
55 bool Contains(int32 x
, int32 y
);
56 bool Contains(int32 x
, int32 y
) const;
58 void PrintToStream() const;
60 void OffsetBy(const BPoint
& point
);
61 void OffsetBy(int32 x
, int32 y
);
62 void ScaleBy(BSize scale
);
63 void ScaleBy(float x
, float y
);
67 void Include(BRect rect
);
68 void Include(clipping_rect clipping
);
69 void Include(const BRegion
* region
);
71 void Exclude(BRect rect
);
72 void Exclude(clipping_rect clipping
);
73 void Exclude(const BRegion
* region
);
75 void IntersectWith(const BRegion
* region
);
77 void ExclusiveInclude(const BRegion
* region
);
80 friend class BDirectWindow
;
81 friend class BPrivate::ServerLink
;
82 friend class BPrivate::LinkReceiver
;
88 BRegion(const clipping_rect
& clipping
);
90 void _AdoptRegionData(BRegion
& region
);
91 bool _SetSize(int32 newSize
);
93 clipping_rect
_Convert(const BRect
& rect
) const;
94 clipping_rect
_ConvertToInternal(const BRect
& rect
) const;
95 clipping_rect
_ConvertToInternal(
96 const clipping_rect
& rect
) const;
101 clipping_rect fBounds
;
102 clipping_rect
* fData
;