BBitmap: add ability to specify client-defined area

Change-Id: Iae1550b3088b0f6c26b0b91d9acb7f7cbcc721d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4369
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: X512 <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
X512
2023-01-02 18:07:53 +00:00
committed by Adrien Destugues
parent 59b54f3810
commit f6c51a5dc4
2 changed files with 121 additions and 51 deletions
+8 -1
View File
@@ -56,6 +56,11 @@ public:
BBitmap(const BBitmap* source,
bool acceptsViews = false,
bool needsContiguous = false);
BBitmap(area_id area, ptrdiff_t areaOffset,
BRect bounds, uint32 flags,
color_space colorSpace,
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
screen_id screenID = B_MAIN_SCREEN_ID);
virtual ~BBitmap();
// Archiving
@@ -133,7 +138,9 @@ private:
int32 _ServerToken() const;
void _InitObject(BRect bounds,
color_space colorSpace, uint32 flags,
int32 bytesPerRow, screen_id screenID);
int32 bytesPerRow, screen_id screenID,
area_id area = -1,
ptrdiff_t areaOffset = 0);
void _CleanUp();
void _AssertPointer();