NAME
DtShapeGetVerticesColor - Get a list of vertices for the
given shape.
SYNOPSIS
#include <Dt.h>
int DtShapeGetVerticesColor( int shapeID, int *count, DtRGBA **colors )
DESCRIPTION
DtShapeGetVerticesColor() returns a vertex color list for
the shape indicated by the given shapeID. A read-only
pointer to a list of the colors per vertex is placed in the
variable pointed to by colors. The number of colors in the
array is placed into the count parameter. The colors array
contains a single color for each positional vector (see
DtShapeGetVertices(3W)). These colors use the same indices
as the positional vectors (see DtFaceGetIndexByShape(3W),
DtPolygonGetIndices(3W))
This array is an internal buffer. Do not free or modify the
color array. C programmers can access the components of the
color array as though it were a simple structure as follows:
typedef struct { unsigned char r, g, b, a; }
DtRGBA;
DtRGBA *colors;
int count;
DtShapeGetVerticesColor( shapeID, &count, &colors
);
/* The first vertex's color */
r = colors[0].r;
g = colors[0].g;
b = colors[0].b;
a = colors[0].a;
DIAGNOSTICS
DtShapeGetVerticesColor() returns one on success and zero on
failure.
FILES
Link with -lDtOMio