Helper class for constructing SkTextBlobs.
More...
#include <SkTextBlob.h>
|
void | reserve (size_t size) |
|
void | allocInternal (const SkPaint &font, SkTextBlob::GlyphPositioning positioning, int count, SkPoint offset, const SkRect *bounds) |
|
bool | mergeRun (const SkPaint &font, SkTextBlob::GlyphPositioning positioning, int count, SkPoint offset) |
|
void | updateDeferredBounds () |
|
|
static SkRect | ConservativeRunBounds (const SkTextBlob::RunRecord &) |
|
static SkRect | TightRunBounds (const SkTextBlob::RunRecord &) |
|
|
SkAutoTMalloc< uint8_t > | fStorage |
|
size_t | fStorageSize |
|
size_t | fStorageUsed |
|
SkRect | fBounds |
|
int | fRunCount |
|
bool | fDeferredBounds |
|
size_t | fLastRun |
|
RunBuffer | fCurrentRunBuffer |
|
Helper class for constructing SkTextBlobs.
const RunBuffer& SkTextBlobBuilder::allocRun |
( |
const SkPaint & |
font, |
|
|
int |
count, |
|
|
SkScalar |
x, |
|
|
SkScalar |
y, |
|
|
const SkRect * |
bounds = NULL |
|
) |
| |
Allocates a new default-positioned run and returns its writable glyph buffer for direct manipulation.
- Parameters
-
font | The font to be used for this run. |
count | Number of glyphs. |
x,y | Position within the blob. |
bounds | Optional run bounding box. If known in advance (!= NULL), it will be used when computing the blob bounds, to avoid re-measuring. |
- Returns
- A writable glyph buffer, valid until the next allocRun() or build() call. The buffer is guaranteed to hold @ glyphs.
const RunBuffer& SkTextBlobBuilder::allocRunPos |
( |
const SkPaint & |
font, |
|
|
int |
count, |
|
|
const SkRect * |
bounds = NULL |
|
) |
| |
Allocates a new fully-positioned run and returns its writable glyph and position buffers for direct manipulation.
- Parameters
-
font | The font to be used for this run. |
count | Number of glyphs. |
bounds | Optional run bounding box. If known in advance (!= NULL), it will be used when computing the blob bounds, to avoid re-measuring. |
- Returns
- Writable glyph and position buffers, valid until the next allocRun() or build() call. The glyph buffer and position buffer are guaranteed to hold @ and 2 * @ elements, respectively.
const RunBuffer& SkTextBlobBuilder::allocRunPosH |
( |
const SkPaint & |
font, |
|
|
int |
count, |
|
|
SkScalar |
y, |
|
|
const SkRect * |
bounds = NULL |
|
) |
| |
Allocates a new horizontally-positioned run and returns its writable glyph and position buffers for direct manipulation.
- Parameters
-
font | The font to be used for this run. |
count | Number of glyphs. |
y | Vertical offset within the blob. |
bounds | Optional run bounding box. If known in advance (!= NULL), it will be used when computing the blob bounds, to avoid re-measuring. |
- Returns
- Writable glyph and position buffers, valid until the next allocRun() or build() call. The buffers are guaranteed to hold @ elements.
Returns an immutable SkTextBlob for the current runs/glyphs.
The builder is reset and can be reused.
The documentation for this class was generated from the following file: