From b57f2b537e5d18964fe340829366bba657fd6dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 13 Apr 2006 13:15:00 +0000 Subject: [PATCH] * added handy BBitmap::Flags() method * added NOTE to BBitmap::LockBits(), has anybody some insight into this? Otherwise we need to write a test app to discover its secrets... :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17120 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/interface/Bitmap.h | 1 + src/kits/interface/Bitmap.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/headers/os/interface/Bitmap.h b/headers/os/interface/Bitmap.h index 8f2106b2b8..91788877ba 100644 --- a/headers/os/interface/Bitmap.h +++ b/headers/os/interface/Bitmap.h @@ -59,6 +59,7 @@ class BBitmap : public BArchivable { int32 BytesPerRow() const; color_space ColorSpace() const; BRect Bounds() const; + uint32 Flags() const; void SetBits(const void *data, int32 length, int32 offset, color_space colorSpace); diff --git a/src/kits/interface/Bitmap.cpp b/src/kits/interface/Bitmap.cpp index 8ee838f1bf..973663b765 100644 --- a/src/kits/interface/Bitmap.cpp +++ b/src/kits/interface/Bitmap.cpp @@ -350,6 +350,8 @@ BBitmap::IsValid() const status_t BBitmap::LockBits(uint32 *state) { + // NOTE: maybe this is used to prevent the app_server from + // drawing the bitmap yet? return B_ERROR; } @@ -423,6 +425,21 @@ BBitmap::Bounds() const return fBounds; } +// Flags +/*! \brief Returns the bitmap's creating flags. + + This method informs about which flags have been used to create the + bitmap. It would for example tell you wether this is an overlay + bitmap. If bitmap creation succeeded, all flags are fulfilled. + + \return The bitmap's creation flags. +*/ +uint32 +BBitmap::Flags() const +{ + return fFlags; +} + // SetBits /*! \brief Assigns data to the bitmap.