Added an extended ImportBits() to ServerBitmap to allow the use of offsets and made ReadBitmap() use it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16593 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2006-03-06 00:18:26 +00:00
parent bdc6f9e7ef
commit ee18c3ccff
2 changed files with 17 additions and 0 deletions

View File

@ -64,6 +64,10 @@ class ServerBitmap {
status_t ImportBits(const void *bits, int32 bitsLength, status_t ImportBits(const void *bits, int32 bitsLength,
int32 bytesPerRow, color_space colorSpace); int32 bytesPerRow, color_space colorSpace);
status_t ImportBits(const void *bits, int32 bitsLength,
int32 bytesPerRow, color_space colorSpace,
BPoint from, BPoint to, int32 width,
int32 height);
void PrintToStream(); void PrintToStream();

View File

@ -258,6 +258,19 @@ ServerBitmap::ImportBits(const void *bits, int32 bitsLength, int32 bytesPerRow,
} }
status_t
ServerBitmap::ImportBits(const void *bits, int32 bitsLength, int32 bytesPerRow,
color_space colorSpace, BPoint from, BPoint to, int32 width, int32 height)
{
if (!bits || bitsLength < 0 || bytesPerRow <= 0 || width < 0 || height < 0)
return B_BAD_VALUE;
return BPrivate::ConvertBits(bits, fBuffer, bitsLength, BitsLength(),
bytesPerRow, fBytesPerRow, colorSpace, fSpace, from, to, fWidth,
fHeight);
}
void void
ServerBitmap::PrintToStream() ServerBitmap::PrintToStream()
{ {