blank_rgba int w int h int r int g int b int a /* * Create a blank rgba image (all pixels have designed color and opacity). */ crimp_image* result; int x, y; result = crimp_new_rgba (w, h); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { R (result, x, y) = r; G (result, x, y) = g; B (result, x, y) = b; A (result, x, y) = a; } } Tcl_SetObjResult(interp, crimp_new_image_obj (result)); return TCL_OK; /* vim: set sts=4 sw=4 tw=80 et ft=c: */ /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */