Added UtilityBitmap class for general-purpose bitmaps in the server

Implemented  blit methods in ViewDriver - doesn't quite work yet :(
Implmemented cursor methods in DisplayDriver - doesn't quite work yet, but wil be fixed later
Color tweak to DefaultDecorator


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6520 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-02-07 13:50:36 +00:00
parent 70b9b61f23
commit b7af05771d
4 changed files with 187 additions and 15 deletions
+21 -1
View File
@@ -89,7 +89,7 @@ ServerBitmap::~ServerBitmap(void)
\brief Gets the number of bytes occupied by the bitmap, including padding bytes.
\return The number of bytes occupied by the bitmap, including padding.
*/
uint32 ServerBitmap::BitsLength(void)
uint32 ServerBitmap::BitsLength(void) const
{
return (uint32)(_bytesperrow*_height);
}
@@ -250,3 +250,23 @@ void ServerBitmap::_HandleSpace(color_space space, int32 bytesperline)
break;
}
}
UtilityBitmap::UtilityBitmap(BRect rect,color_space space, int32 flags,
int32 bytesperline, screen_id screen)
: ServerBitmap(rect,space,flags,bytesperline,screen)
{
_AllocateBuffer();
}
UtilityBitmap::UtilityBitmap(const ServerBitmap *bmp)
: ServerBitmap(bmp)
{
_AllocateBuffer();
if(bmp->Bits())
memcpy(Bits(),bmp->Bits(),bmp->BitsLength());
}
UtilityBitmap::~UtilityBitmap(void)
{
_FreeBuffer();
}