BBitmapStream¶
Constructor and Destructor¶
BBitmapStream()
BBitmapStream::BBitmapStream(BBitmap *map = NULL)
Creates a new instance of BBitmapStream. If map is NULL, the stream
is initialized to be empty. Otherwise, the BBitmap
is converted to a translator bitmap
and placed in the stream. The application shares the BBitmap
with the
BBitmapStream object. It therefore shouldn’t delete the BBitmap
without first
calling DetachBitmap()
.
BBitmapStream()
~BBitmapStream::BBitmapStream()
Frees all memory allocated by the
BTranslatorRoster
.
Member Functions¶
DetachBitmap()
status_t BBitmapStream::DetachBitmap(BBitmap **outMap)
Returns, in outMap, a BBitmap
representing the image contained in the
BBitmapStream. Once DetachBitmap() has been called, no further operations
should be performed on the BBitmapStream.
Return Code |
Description |
---|---|
|
Success. |
|
outMap is NULL. |
|
There is no |
Position(), ReadAt(), Seek(), SetSize(), WriteAt()
off_t BBitmapStream::Position() const
ssize_t BBitmapStream::ReadAt(off_t position, void *buffer, size_t size)
off_t BBitmapStream::Seek(off_t position, int32 whence)
status_t BBitmapStream::SetSize(off_t size) const
ssize_t BBitmapStream::WriteAt(off_t pos, const void *data, size_t size)
These methods provide the implementation for the BPositionIO
. The class functions
identically to BPositionIO
with the exception of ReadAt() and
WriteAt(), which read and write only translator bitmaps as described in the class
introduction.
Size()
off_t BBitmapStream::Size() const
Returns the number of bytes in the translator bitmap in the stream.