|
| SkWriter32 (void *external=NULL, size_t externalBytes=0) |
| The caller can specify an initial block of storage, which the caller manages. More...
|
|
size_t | bytesWritten () const |
|
size_t | size () const |
|
void | reset (void *external=NULL, size_t externalBytes=0) |
|
uint32_t * | reserve (size_t size) |
|
template<typename T > |
const T & | readTAt (size_t offset) const |
| Read a T record at offset, which must be a multiple of 4. More...
|
|
template<typename T > |
void | overwriteTAt (size_t offset, const T &value) |
| Overwrite a T record at offset, which must be a multiple of 4. More...
|
|
bool | writeBool (bool value) |
|
void | writeInt (int32_t value) |
|
void | write8 (int32_t value) |
|
void | write16 (int32_t value) |
|
void | write32 (int32_t value) |
|
void | writePtr (void *value) |
|
void | writeScalar (SkScalar value) |
|
void | writePoint (const SkPoint &pt) |
|
void | writePoint3 (const SkPoint3 &pt) |
|
void | writeRect (const SkRect &rect) |
|
void | writeIRect (const SkIRect &rect) |
|
void | writeRRect (const SkRRect &rrect) |
|
void | writePath (const SkPath &path) |
|
void | writeMatrix (const SkMatrix &matrix) |
|
void | writeRegion (const SkRegion &rgn) |
|
void | writeMul4 (const void *values, size_t size) |
|
void | write (const void *values, size_t size) |
| Write size bytes from values. More...
|
|
uint32_t * | reservePad (size_t size) |
| Reserve size bytes. More...
|
|
void | writePad (const void *src, size_t size) |
| Write size bytes from src, and pad to 4 byte alignment with zeroes.
|
|
void | writeString (const char *str, size_t len=(size_t)-1) |
| Writes a string to the writer, which can be retrieved with SkReader32::readString(). More...
|
|
void | writeData (const SkData *data) |
|
void | rewindToOffset (size_t offset) |
| Move the cursor back to offset bytes from the beginning. More...
|
|
void | flatten (void *dst) const |
|
bool | writeToStream (SkWStream *stream) const |
|
size_t | readFromStream (SkStream *stream, size_t length) |
|
sk_sp< SkData > | snapshotAsData () const |
| Captures a snapshot of the data as it is right now, and return it.
|
|
void SkWriter32::writeString |
( |
const char * |
str, |
|
|
size_t |
len = (size_t)-1 |
|
) |
| |
Writes a string to the writer, which can be retrieved with SkReader32::readString().
The length can be specified, or if -1 is passed, it will be computed by calling strlen(). The length must be < max size_t.
If you write NULL, it will be read as "".