Lines Matching refs:pos
66 BBitmapStream::ReadAt(off_t pos, void* buffer, size_t size)
72 if (pos >= (off_t)fSize || pos < 0 || buffer == NULL)
78 if (pos < (off_t)sizeof(TranslatorBitmap)) {
79 toRead = sizeof(TranslatorBitmap) - pos;
80 source = (reinterpret_cast<uint8 *>(fBigEndianHeader)) + pos;
82 toRead = fSize - pos;
83 source = (reinterpret_cast<uint8 *>(fBitmap->Bits())) + pos -
96 BBitmapStream::WriteAt(off_t pos, const void* data, size_t size)
100 if (!data || pos < 0 || pos > (off_t)fSize)
109 if (pos < (off_t)sizeof(TranslatorBitmap)) {
110 toWrite = sizeof(TranslatorBitmap) - pos;
111 dest = (reinterpret_cast<uint8 *> (&fHeader)) + pos;
116 toWrite = fHeader.dataSize - pos + sizeof(TranslatorBitmap);
118 pos - sizeof(TranslatorBitmap);
127 pos += toWrite;
131 if (pos > (off_t)fSize)
132 fSize = pos;
134 if (pos == sizeof(TranslatorBitmap)) {