An immutable set of vertex data that can be used with SkCanvas::drawVertices.
More...
#include <SkVertices.h>
|
enum | VertexMode { kTriangles_VertexMode,
kTriangleStrip_VertexMode,
kTriangleFan_VertexMode
} |
|
enum | BuilderFlags { kHasTexCoords_BuilderFlag = 1 << 0,
kHasColors_BuilderFlag = 1 << 1
} |
|
|
uint32_t | uniqueID () const |
|
VertexMode | mode () const |
|
const SkRect & | bounds () const |
|
bool | hasColors () const |
|
bool | hasTexCoords () const |
|
bool | hasIndices () const |
|
int | vertexCount () const |
|
const SkPoint * | positions () const |
|
const SkPoint * | texCoords () const |
|
const SkColor * | colors () const |
|
int | indexCount () const |
|
const uint16_t * | indices () const |
|
size_t | approximateSize () const |
|
sk_sp< SkData > | encode () const |
| Pack the vertices object into a byte buffer. More...
|
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
void | deref () const |
|
|
static sk_sp< SkVertices > | MakeCopy (VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[]) |
| Create a vertices by copying the specified arrays. More...
|
|
static sk_sp< SkVertices > | MakeCopy (VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[]) |
|
static sk_sp< SkVertices > | Decode (const void *buffer, size_t length) |
| Recreate a vertices from a buffer previously created by calling encode(). More...
|
|
|
void | operator delete (void *p) |
|
|
static sk_sp< SkVertices > | Alloc (int vCount, int iCount, uint32_t builderFlags, size_t *arraySize) |
|
|
uint32_t | fUniqueID |
|
SkPoint * | fPositions |
|
SkPoint * | fTexs |
|
SkColor * | fColors |
|
uint16_t * | fIndices |
|
SkRect | fBounds |
|
int | fVertexCnt |
|
int | fIndexCnt |
|
VertexMode | fMode |
|
|
class | SkNVRefCnt< SkVertices > |
|
An immutable set of vertex data that can be used with SkCanvas::drawVertices.
static sk_sp<SkVertices> SkVertices::Decode |
( |
const void * |
buffer, |
|
|
size_t |
length |
|
) |
| |
|
static |
Recreate a vertices from a buffer previously created by calling encode().
Returns null if the data is corrupt or the length is incorrect for the contents.
Pack the vertices object into a byte buffer.
This can be used to recreate the vertices by calling Decode() with the buffer.
static sk_sp<SkVertices> SkVertices::MakeCopy |
( |
VertexMode |
mode, |
|
|
int |
vertexCount, |
|
|
const SkPoint |
positions[], |
|
|
const SkPoint |
texs[], |
|
|
const SkColor |
colors[], |
|
|
int |
indexCount, |
|
|
const uint16_t |
indices[] |
|
) |
| |
|
static |
Create a vertices by copying the specified arrays.
texs and colors may be nullptr, and indices is ignored if indexCount == 0.
The documentation for this class was generated from the following file: