case VG_sL_8: {
VGubyte *dst = (VGubyte *)dstAddr;
for (i = 0; i < n; ++i) {
- VGubyte r, g, b, a;
- r = float_to_ubyte(rgba[i][0]);
- g = float_to_ubyte(rgba[i][1]);
- b = float_to_ubyte(rgba[i][2]);
+ VGubyte a;
a = float_to_ubyte(rgba[i][3]);
dst[i] = a;
case VG_lL_8: {
VGubyte *dst = (VGubyte *)dstAddr;
for (i = 0; i < n; ++i) {
- VGubyte r, g, b ,a;
- r = float_to_ubyte(rgba[i][0]);
- g = float_to_ubyte(rgba[i][1]);
- b = float_to_ubyte(rgba[i][2]);
+ VGubyte a;
a = float_to_ubyte(rgba[i][3]);
dst[i] = a;
}
case VG_A_8: {
VGubyte *dst = (VGubyte *)dstAddr;
for (i = 0; i < n; ++i) {
- VGubyte r, g, b, a;
- r = float_to_ubyte(rgba[i][0]);
- g = float_to_ubyte(rgba[i][1]);
- b = float_to_ubyte(rgba[i][2]);
+ VGubyte a;
a = float_to_ubyte(rgba[i][3]);
dst[i] = a;
case VG_A_1: {
VGshort *dst = (VGshort *)dstAddr;
for (i = 0; i < n; ++i) {
- VGubyte r, g, b, a;
- r = float_to_ubyte(rgba[i][0]);
- g = float_to_ubyte(rgba[i][1]);
- b = float_to_ubyte(rgba[i][2]);
+ VGubyte a;
a = float_to_ubyte(rgba[i][3]);
dst[i] = (a & (128));
case VG_A_4: {
VGshort *dst = (VGshort *)dstAddr;
for (i = 0; i < n; ++i) {
- VGubyte r, g, b, a;
+ VGubyte a;
VGubyte res;
- r = float_to_ubyte(rgba[i][0]);
- g = float_to_ubyte(rgba[i][1]);
- b = float_to_ubyte(rgba[i][2]);
a = float_to_ubyte(rgba[i][3]);
res = a/4;