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:
parent
bdc6f9e7ef
commit
ee18c3ccff
|
@ -64,6 +64,10 @@ class ServerBitmap {
|
|||
|
||||
status_t ImportBits(const void *bits, int32 bitsLength,
|
||||
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();
|
||||
|
||||
|
|
|
@ -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
|
||||
ServerBitmap::PrintToStream()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue