[GRASS-SVN] r44174 - grass/branches/develbranch_6/lib/cairodriver
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 4 16:53:08 EDT 2010
Author: neteler
Date: 2010-11-04 13:53:08 -0700 (Thu, 04 Nov 2010)
New Revision: 44174
Modified:
grass/branches/develbranch_6/lib/cairodriver/Raster.c
Log:
glynn: Fix drawing transparent cells over opaque cells (backport from trunk, r40501)
Modified: grass/branches/develbranch_6/lib/cairodriver/Raster.c
===================================================================
--- grass/branches/develbranch_6/lib/cairodriver/Raster.c 2010-11-04 20:52:46 UTC (rev 44173)
+++ grass/branches/develbranch_6/lib/cairodriver/Raster.c 2010-11-04 20:53:08 UTC (rev 44174)
@@ -58,13 +58,16 @@
G_debug(3, "Cairo_scaled_raster: %d %d", n, row);
for (i = 0; i < n; i++) {
- unsigned int r = red[i];
- unsigned int g = grn[i];
- unsigned int b = blu[i];
- unsigned int a = (masked && nul && nul[i])
- ? 0x00 : 0xFF;
+ if (masked && nul && nul[i])
+ *dst++ = 0;
+ else {
+ unsigned int r = red[i];
+ unsigned int g = grn[i];
+ unsigned int b = blu[i];
+ unsigned int a = 0xFF;
- *dst++ = (a << 24) + (r << 16) + (g << 8) + (b << 0);
+ *dst++ = (a << 24) + (r << 16) + (g << 8) + (b << 0);
+ }
}
return row + 1;
More information about the grass-commit
mailing list