app_server/Interface Kit: add new clipping API
* Add new clipping API for rectangles (ClipToRect, ClipToInverseRect) and shapes (ClipToShape, ClipToInverseShape) * Works with affine transforms and automatically switches from fast region-based clipping to alpha-mask based clipping as necessary. * Always self-intersecting, i.e. no state push required to further narrow down the clipping region. All of the 4 new methods can be mixed in any order.
This commit is contained in:
@@ -223,6 +223,11 @@ public:
|
||||
void ClipToInversePicture(BPicture* picture,
|
||||
BPoint where = B_ORIGIN, bool sync = true);
|
||||
|
||||
void ClipToRect(BRect rect);
|
||||
void ClipToInverseRect(BRect rect);
|
||||
void ClipToShape(BShape* shape);
|
||||
void ClipToInverseShape(BShape* shape);
|
||||
|
||||
virtual void SetDrawingMode(drawing_mode mode);
|
||||
drawing_mode DrawingMode() const;
|
||||
|
||||
@@ -651,6 +656,9 @@ private:
|
||||
void _ClipToPicture(BPicture* picture, BPoint where,
|
||||
bool invert, bool sync);
|
||||
|
||||
void _ClipToRect(BRect rect, bool inverse);
|
||||
void _ClipToShape(BShape* shape, bool inverse);
|
||||
|
||||
bool _CheckOwnerLockAndSwitchCurrent() const;
|
||||
bool _CheckOwnerLock() const;
|
||||
void _CheckLockAndSwitchCurrent() const;
|
||||
|
||||
Reference in New Issue
Block a user