On Mon, Jun 03, 2013 at 01:46:35AM -0300, Vin??cius dos Santos Oliveira wrote:
You can find an initial repo skel that copies the pixel data in a
graph
data structure and build instructions. I'm using Inkscape code convetions
and Inkscape dependencies. I hope I didn't miss anything.
+ guint8 r;
+ guint8 g;
+ guint8 b;
+ guint8 a;
I would recommend against this approach, instead, use
guint8 rgba[4];
and replace
+ _vertices[i].r = pixels[0];
+ _vertices[i].g = pixels[1];
+ _vertices[i].b = pixels[2];
+ _vertices[i].a = pixels[3];
with
for (int p = 0; p < 4; p++) {
_vertices[i].rgba[p] = pixels[p];
}
It generally ends up being less work and less error prone.
njh