[mapserver-commits] r11205 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Mar 17 14:58:31 EDT 2011
Author: tbonfort
Date: 2011-03-17 11:58:31 -0700 (Thu, 17 Mar 2011)
New Revision: 11205
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/maperror.c
trunk/mapserver/mapfile.c
trunk/mapserver/mapogcsld.c
trunk/mapserver/mapogr.cpp
trunk/mapserver/maprendering.c
trunk/mapserver/mapresample.c
trunk/mapserver/mapserver.h
trunk/mapserver/maputil.c
Log:
stop using style->opacity, start using colorObj->alpha
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/HISTORY.TXT 2011-03-17 18:58:31 UTC (rev 11205)
@@ -13,7 +13,10 @@
Current Version (SVN trunk):
----------------------------
+- change MS_INIT_COLOR to take alpha as a parameter
+- stop using style->opacity in rendering code, use alpha from colorObjs.
+
- Fixed big Oracle memory leak when rendering in KML (#3719)
- avoid linking in postgres dependencies unnecessarily (#3708)
Modified: trunk/mapserver/maperror.c
===================================================================
--- trunk/mapserver/maperror.c 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/maperror.c 2011-03-17 18:58:31 UTC (rev 11205)
@@ -427,8 +427,8 @@
/* use the first font we find */
if((font = renderer->bitmapFontMetrics[font_index]) != NULL) {
ls.size = i;
- MS_INIT_COLOR(*ls.color,0,0,0);
- MS_INIT_COLOR(*ls.outlinecolor,255,255,255);
+ MS_INIT_COLOR(*ls.color,0,0,0,255);
+ MS_INIT_COLOR(*ls.outlinecolor,255,255,255,255);
break;
}
}
Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/mapfile.c 2011-03-17 18:58:31 UTC (rev 11205)
@@ -1573,11 +1573,11 @@
label->antialias = -1; /* off */
label->align = MS_ALIGN_LEFT;
- MS_INIT_COLOR(label->color, 0,0,0);
- MS_INIT_COLOR(label->outlinecolor, -1,-1,-1); /* don't use it */
+ MS_INIT_COLOR(label->color, 0,0,0,255);
+ MS_INIT_COLOR(label->outlinecolor, -1,-1,-1,255); /* don't use it */
label->outlinewidth=1;
- MS_INIT_COLOR(label->shadowcolor, -1,-1,-1); /* don't use it */
+ MS_INIT_COLOR(label->shadowcolor, -1,-1,-1,255); /* don't use it */
label->shadowsizex = label->shadowsizey = 1;
label->font = NULL;
@@ -2312,12 +2312,12 @@
int initStyle(styleObj *style) {
int i;
MS_REFCNT_INIT(style);
- MS_INIT_COLOR(style->color, -1,-1,-1); /* must explictly set colors */
- MS_INIT_COLOR(style->backgroundcolor, -1,-1,-1);
- MS_INIT_COLOR(style->outlinecolor, -1,-1,-1);
+ MS_INIT_COLOR(style->color, -1,-1,-1,255); /* must explictly set colors */
+ MS_INIT_COLOR(style->backgroundcolor, -1,-1,-1,255);
+ MS_INIT_COLOR(style->outlinecolor, -1,-1,-1,255);
/* New Color Range fields*/
- MS_INIT_COLOR(style->mincolor, -1,-1,-1);
- MS_INIT_COLOR(style->maxcolor, -1,-1,-1);
+ MS_INIT_COLOR(style->mincolor, -1,-1,-1,255);
+ MS_INIT_COLOR(style->maxcolor, -1,-1,-1,255);
style->minvalue = 0.0;
style->maxvalue = 1.0;
style->rangeitem = NULL;
@@ -3261,7 +3261,7 @@
initCluster(&layer->cluster);
- MS_INIT_COLOR(layer->offsite, -1,-1,-1);
+ MS_INIT_COLOR(layer->offsite, -1,-1,-1, 255);
layer->labelcache = MS_ON;
layer->postlabelcache = MS_FALSE;
@@ -3960,8 +3960,8 @@
ref->height = ref->width = 0;
ref->extent.minx = ref->extent.miny = ref->extent.maxx = ref->extent.maxy = -1.0;
ref->image = NULL;
- MS_INIT_COLOR(ref->color, 255, 0, 0);
- MS_INIT_COLOR(ref->outlinecolor, 0, 0, 0);
+ MS_INIT_COLOR(ref->color, 255, 0, 0, 255);
+ MS_INIT_COLOR(ref->outlinecolor, 0, 0, 0, 255);
ref->status = MS_OFF;
ref->marker = 0;
ref->markername = NULL;
@@ -4310,8 +4310,8 @@
void initLegend(legendObj *legend)
{
legend->height = legend->width = 0;
- MS_INIT_COLOR(legend->imagecolor, 255,255,255); /* white */
- MS_INIT_COLOR(legend->outlinecolor, -1,-1,-1);
+ MS_INIT_COLOR(legend->imagecolor, 255,255,255,255); /* white */
+ MS_INIT_COLOR(legend->outlinecolor, -1,-1,-1,255);
initLabel(&legend->label);
legend->label.position = MS_XY; /* override */
legend->keysizex = 20;
@@ -4445,16 +4445,16 @@
*/
void initScalebar(scalebarObj *scalebar)
{
- MS_INIT_COLOR(scalebar->imagecolor, 255,255,255);
+ MS_INIT_COLOR(scalebar->imagecolor, 255,255,255,255);
scalebar->width = 200;
scalebar->height = 3;
scalebar->style = 0; /* only 2 styles at this point */
scalebar->intervals = 4;
initLabel(&scalebar->label);
scalebar->label.position = MS_XY; /* override */
- MS_INIT_COLOR(scalebar->backgroundcolor, -1,-1,-1); /* if not set, scalebar creation needs to set this to match the background color */
- MS_INIT_COLOR(scalebar->color, 0,0,0); /* default to black */
- MS_INIT_COLOR(scalebar->outlinecolor, -1,-1,-1);
+ MS_INIT_COLOR(scalebar->backgroundcolor, -1,-1,-1,255); /* if not set, scalebar creation needs to set this to match the background color */
+ MS_INIT_COLOR(scalebar->color, 0,0,0,255); /* default to black */
+ MS_INIT_COLOR(scalebar->outlinecolor, -1,-1,-1,255);
scalebar->units = MS_MILES;
scalebar->status = MS_OFF;
scalebar->position = MS_LL;
@@ -4595,7 +4595,7 @@
querymap->width = querymap->height = -1;
querymap->style = MS_HILITE;
querymap->status = MS_OFF;
- MS_INIT_COLOR(querymap->color, 255,255,0); /* yellow */
+ MS_INIT_COLOR(querymap->color, 255,255,0,255); /* yellow */
}
int loadQueryMap(queryMapObj *querymap)
@@ -4924,7 +4924,7 @@
map->shapepath = NULL;
map->mappath = NULL;
- MS_INIT_COLOR(map->imagecolor, 255,255,255); /* white */
+ MS_INIT_COLOR(map->imagecolor, 255,255,255,255); /* white */
map->numoutputformats = 0;
map->outputformatlist = NULL;
Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/mapogcsld.c 2011-03-17 18:58:31 UTC (rev 11205)
@@ -1261,8 +1261,8 @@
if(psCssParam->psChild && psCssParam->psChild->psNext &&
psCssParam->psChild->psNext->pszValue)
{
- psStyle->opacity =
- (int)(atof(psCssParam->psChild->psNext->pszValue) * 100);
+ psStyle->color.alpha =
+ (int)(atof(psCssParam->psChild->psNext->pszValue)*255);
}
}
}
@@ -1523,8 +1523,7 @@
if(psCssParam->psChild && psCssParam->psChild->psNext &&
psCssParam->psChild->psNext->pszValue)
{
- psStyle->opacity =
- (int)(atof(psCssParam->psChild->psNext->pszValue)*100);
+ psStyle->color.alpha = (int)(atof(psCssParam->psChild->psNext->pszValue)*255);
}
}
}
@@ -3896,9 +3895,11 @@
sCssParam, szHexColor, sCssParam);
pszSLD = msStringConcatenate(pszSLD, szTmp);
- snprintf(szTmp, sizeof(szTmp),
- "<%s name=\"stroke-opacity\">%.2f</%s>\n",
- sCssParam, (float)psStyle->opacity/100, sCssParam);
+ if(psStyle->color.alpha != 255 && psStyle->color.alpha!=-1) {
+ snprintf(szTmp, sizeof(szTmp),
+ "<%s name=\"stroke-opacity\">%.2f</%s>\n",
+ sCssParam, (float)psStyle->color.alpha/255, sCssParam);
+ }
pszSLD = msStringConcatenate(pszSLD, szTmp);
@@ -4030,9 +4031,11 @@
sCssParam, szHexColor, sCssParam);
pszSLD = msStringConcatenate(pszSLD, szTmp);
- snprintf(szTmp, sizeof(szTmp),
- "<%s name=\"fill-opacity\">%.2f</%s>\n",
- sCssParam, ((float)psStyle->opacity)/100, sCssParam);
+ if(psStyle->color.alpha != 255 && psStyle->color.alpha!=-1) {
+ snprintf(szTmp, sizeof(szTmp),
+ "<%s name=\"fill-opacity\">%.2f</%s>\n",
+ sCssParam, (float)psStyle->color.alpha/255, sCssParam);
+ }
pszSLD = msStringConcatenate(pszSLD, szTmp);
Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/mapogr.cpp 2011-03-17 18:58:31 UTC (rev 11205)
@@ -2942,7 +2942,7 @@
if (!bIsNull && OGR_ST_GetRGBFromString(hLabelStyle, pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->label.color, r, g, b);
+ MS_INIT_COLOR(c->label.color, r, g, b, t);
}
pszColor = OGR_ST_GetParamStr(hLabelStyle,
@@ -2951,7 +2951,7 @@
if (!bIsNull && OGR_ST_GetRGBFromString(hLabelStyle, pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->label.shadowcolor, r, g, b);
+ MS_INIT_COLOR(c->label.shadowcolor, r, g, b, t);
}
#if GDAL_VERSION_NUM >= 1600
@@ -2961,7 +2961,7 @@
if (!bIsNull && OGR_ST_GetRGBFromString(hLabelStyle, pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->label.outlinecolor, r, g, b);
+ MS_INIT_COLOR(c->label.outlinecolor, r, g, b, t);
}
#endif /* GDAL_VERSION_NUM >= 1600 */
@@ -3044,19 +3044,19 @@
const char *pszColor = poLabelStyle->ForeColor(bIsNull);
if (!bIsNull && poLabelStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(c->label.color, r, g, b);
+ MS_INIT_COLOR(c->label.color, r, g, b, t);
}
pszColor = poLabelStyle->BackColor(bIsNull);
if (!bIsNull && poLabelStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(c->label.backgroundcolor, r, g, b);
+ MS_INIT_COLOR(c->label.backgroundcolor, r, g, b, t);
}
#if GDAL_VERSION_NUM >= 1400
pszColor = poLabelStyle->ShadowColor(bIsNull);
if (!bIsNull && poLabelStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(c->label.shadowcolor, r, g, b);
+ MS_INIT_COLOR(c->label.shadowcolor, r, g, b, t);
}
#endif
// Label font... do our best to use TrueType fonts, otherwise
@@ -3122,13 +3122,13 @@
t =-1;
// Make sure pen is always initialized
- MS_INIT_COLOR(oPenColor, -1, -1, -1);
+ MS_INIT_COLOR(oPenColor, -1, -1, -1,255);
// Check for Pen Pattern "ogr-pen-1": the invisible pen
// If that's what we have then set pen color to -1
if (pszPenName && strstr(pszPenName, "ogr-pen-1") != NULL)
{
- MS_INIT_COLOR(oPenColor, -1, -1, -1);
+ MS_INIT_COLOR(oPenColor, -1, -1, -1,255);
}
else
{
@@ -3138,7 +3138,7 @@
if (!bIsNull && OGR_ST_GetRGBFromString(hPenStyle, pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(oPenColor, r, g, b);
+ MS_INIT_COLOR(oPenColor, r, g, b, t);
if (layer->debug >= MS_DEBUGLEVEL_VVV)
msDebug("** PEN COLOR = %d %d %d **\n", r,g,b);
}
@@ -3174,8 +3174,6 @@
c->styles[1]->size = nPenSize;
c->styles[1]->symbol = nPenSymbol;
c->styles[1]->width = nPenSize;
- if (t >= 0 && t<=255)
- c->styles[1]->opacity = (int)t*100/255;
}
else
{
@@ -3198,8 +3196,6 @@
c->styles[0]->symbol = nPenSymbol;
c->styles[0]->size = nPenSize;
c->styles[0]->width = nPenSize;
- if (t >= 0 && t<=255)
- c->styles[0]->opacity = (int)t*100/255;
}
}
@@ -3229,7 +3225,8 @@
const char *pszColor = poPenStyle->Color(bIsNull);
if (!bIsNull && poPenStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(oPenColor, r, g, b);
+ MS_INIT_COLOR(oPenColor, r, g, b, t);
+
if (layer->debug >= MS_DEBUGLEVEL_VVV)
msDebug("** PEN COLOR = %d %d %d **\n", r,g,b);
}
@@ -3264,8 +3261,6 @@
c->styles[1]->size = nPenSize;
c->styles[1]->symbol = nPenSymbol;
c->styles[1]->width = nPenSize;
- if (t >= 0 && t<=255)
- c->styles[1]->opacity = (int)t*100/255;
}
else
{
@@ -3288,8 +3283,6 @@
c->styles[0]->symbol = nPenSymbol;
c->styles[0]->size = nPenSize;
c->styles[0]->width = nPenSize;
- if (t >= 0 && t<=255)
- c->styles[0]->opacity = (int)t*100/255;
}
}
@@ -3319,7 +3312,7 @@
// If that's what we have then set fill color to -1
if (pszBrushName && strstr(pszBrushName, "ogr-brush-1") != NULL)
{
- MS_INIT_COLOR(c->styles[0]->color, -1, -1, -1);
+ MS_INIT_COLOR(c->styles[0]->color, -1, -1, -1, 255);
}
else
{
@@ -3331,9 +3324,7 @@
pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->styles[0]->color, r, g, b);
- if (t >= 0 && t<=255)
- c->styles[0]->opacity = (int)t*100/255;
+ MS_INIT_COLOR(c->styles[0]->color, r, g, b, t);
if (layer->debug >= MS_DEBUGLEVEL_VVV)
msDebug("** BRUSH COLOR = %d %d %d **\n", r,g,b);
@@ -3345,7 +3336,7 @@
pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->styles[0]->backgroundcolor, r, g, b);
+ MS_INIT_COLOR(c->styles[0]->backgroundcolor, r, g, b, t);
}
// Symbol name mapping:
@@ -3382,7 +3373,7 @@
// If that's what we have then set fill color to -1
if (pszBrushName && strstr(pszBrushName, "ogr-brush-1") != NULL)
{
- MS_INIT_COLOR(c->styles[0]->color, -1, -1, -1);
+ MS_INIT_COLOR(c->styles[0]->color, -1, -1, -1, 255);
}
else
{
@@ -3390,9 +3381,7 @@
const char *pszColor = poBrushStyle->ForeColor(bIsNull);
if (!bIsNull && poBrushStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(c->styles[0]->color, r, g, b);
- if (t >= 0 && t<=255)
- c->styles[1]->opacity = (int)t*100/255;
+ MS_INIT_COLOR(c->styles[0]->color, r, g, b, t);
if (layer->debug >= MS_DEBUGLEVEL_VVV)
msDebug("** BRUSH COLOR = %d %d %d **\n", r,g,b);
}
@@ -3400,7 +3389,7 @@
pszColor = poBrushStyle->BackColor(bIsNull);
if (!bIsNull && poBrushStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(c->styles[0]->backgroundcolor, r, g, b);
+ MS_INIT_COLOR(c->styles[0]->backgroundcolor, r, g, b, t);
}
// Symbol name mapping:
@@ -3439,9 +3428,7 @@
pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->styles[0]->color, r, g, b);
- if (t >= 0 && t<=255)
- c->styles[0]->opacity = (int)t*100/255;
+ MS_INIT_COLOR(c->styles[0]->color, r, g, b, t);
}
#if GDAL_VERSION_NUM >= 1600
@@ -3452,9 +3439,7 @@
pszColor,
&r, &g, &b, &t))
{
- MS_INIT_COLOR(c->styles[0]->outlinecolor, r, g, b);
- if (t >= 0 && t<=255)
- c->styles[0]->opacity = (int)t*100/255;
+ MS_INIT_COLOR(c->styles[0]->outlinecolor, r, g, b, t);
}
#endif /* GDAL_VERSION_NUM >= 1600 */
c->styles[0]->angle = OGR_ST_GetParamNum(hSymbolStyle,
@@ -3502,9 +3487,7 @@
const char *pszColor = poSymbolStyle->Color(bIsNull);
if (!bIsNull && poSymbolStyle->GetRGBFromString(pszColor,r,g,b,t))
{
- MS_INIT_COLOR(c->styles[0]->color, r, g, b);
- if (t >= 0 && t<=255)
- c->styles[1]->opacity = (int)t*100/255;
+ MS_INIT_COLOR(c->styles[0]->color, r, g, b, t);
}
c->styles[0]->angle = poSymbolStyle->Angle(bIsNull);
Modified: trunk/mapserver/maprendering.c
===================================================================
--- trunk/mapserver/maprendering.c 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/maprendering.c 2011-03-17 18:58:31 UTC (rev 11205)
@@ -35,12 +35,9 @@
return MS_SUCCESS;
}
void computeSymbolStyle(symbolStyleObj *s, styleObj *src, symbolObj *symbol, double scalefactor) {
-
- int alpha;
double default_size;
double target_size;
- alpha = MS_NINT(src->opacity*2.55);;
default_size = msSymbolGetDefaultSize(symbol);
target_size = (src->size==-1)?default_size:src->size;
@@ -59,13 +56,10 @@
s->outlinecolor = &(src->outlinecolor);
s->color = NULL;
}
- if(s->color) s->color->alpha = alpha;
- if(s->outlinecolor) s->outlinecolor->alpha = alpha;
if(MS_VALID_COLOR(src->backgroundcolor)) {
s->backgroundcolor = &(src->backgroundcolor);
- s->backgroundcolor->alpha = alpha;
}
target_size *= scalefactor;
@@ -411,7 +405,6 @@
msSetError(MS_MISCERR,"no color defined for line styling","msDrawLineSymbol()");
return MS_FAILURE;
}
- s.color->alpha = MS_NINT(style->opacity * 2.55);
renderer->renderLine(image,offsetLine,&s);
}
else {
@@ -528,7 +521,6 @@
/* simple polygon drawing, without any specific symbol.
* also draws an optional outline */
if(style->symbol == 0 || symbol->type == MS_SYMBOL_SIMPLE) {
- style->color.alpha = MS_NINT(style->opacity*2.55);
ret = renderer->renderPolygon(image,offsetPolygon,&style->color);
if(ret != MS_SUCCESS) goto cleanup;
if(MS_VALID_COLOR(style->outlinecolor)) {
@@ -550,7 +542,6 @@
if(ret != MS_SUCCESS) goto cleanup;
}
width = (style->width <= 0)?scalefactor:style->width*scalefactor;
- style->color.alpha = MS_NINT(style->opacity*2.55);
spacing = (style->size <= 0)?scalefactor:style->size*scalefactor;
ret = msHatchPolygon(image,offsetPolygon,spacing,width,style->angle, &style->color);
goto cleanup;
Modified: trunk/mapserver/mapresample.c
===================================================================
--- trunk/mapserver/mapresample.c 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/mapresample.c 2011-03-17 18:58:31 UTC (rev 11205)
@@ -1541,7 +1541,7 @@
sDummyMap.outputformat->transparent = MS_TRUE;
sDummyMap.outputformat->imagemode = MS_IMAGEMODE_RGBA;
- MS_INIT_COLOR(sDummyMap.imagecolor,-1,-1,-1);
+ MS_INIT_COLOR(sDummyMap.imagecolor,-1,-1,-1,255);
}
}
Modified: trunk/mapserver/mapserver.h
===================================================================
--- trunk/mapserver/mapserver.h 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/mapserver.h 2011-03-17 18:58:31 UTC (rev 11205)
@@ -344,7 +344,7 @@
/* #define MS_VALID_EXTENT(minx, miny, maxx, maxy) (((minx<maxx) && (miny<maxy))?MS_TRUE:MS_FALSE) */
#define MS_VALID_EXTENT(rect) (((rect.minx < rect.maxx && rect.miny < rect.maxy))?MS_TRUE:MS_FALSE)
-#define MS_INIT_COLOR(color,r,g,b) { (color).red = r; (color).green = g; (color).blue = b; (color).pen = MS_PEN_UNSET; (color).alpha=255; }
+#define MS_INIT_COLOR(color,r,g,b,a) { (color).red = r; (color).green = g; (color).blue = b; (color).pen = MS_PEN_UNSET; (color).alpha=a; }
#define MS_VALID_COLOR(color) (((color).red==-1 || (color).green==-1 || (color).blue==-1)?MS_FALSE:MS_TRUE)
#define MS_TRANSPARENT_COLOR(color) (((color).alpha==0 || (color).red==-255 || (color).green==-255 || (color).blue==-255)?MS_TRUE:MS_FALSE)
#define MS_COMPARE_COLORS(a,b) (((a).red!=(b).red || (a).green!=(b).green || (a).blue!=(b).blue)?MS_FALSE:MS_TRUE)
Modified: trunk/mapserver/maputil.c
===================================================================
--- trunk/mapserver/maputil.c 2011-03-17 18:35:06 UTC (rev 11204)
+++ trunk/mapserver/maputil.c 2011-03-17 18:58:31 UTC (rev 11205)
@@ -127,11 +127,11 @@
bindDoubleAttribute(&style->width, shape->values[style->bindings[MS_STYLE_BINDING_WIDTH].index]);
}
if(style->bindings[MS_STYLE_BINDING_COLOR].index != -1 && (querymapMode != MS_TRUE)) {
- MS_INIT_COLOR(style->color, -1,-1,-1);
+ MS_INIT_COLOR(style->color, -1,-1,-1,255);
bindColorAttribute(&style->color, shape->values[style->bindings[MS_STYLE_BINDING_COLOR].index]);
}
if(style->bindings[MS_STYLE_BINDING_OUTLINECOLOR].index != -1 && (querymapMode != MS_TRUE)) {
- MS_INIT_COLOR(style->outlinecolor, -1,-1,-1);
+ MS_INIT_COLOR(style->outlinecolor, -1,-1,-1,255);
bindColorAttribute(&style->outlinecolor, shape->values[style->bindings[MS_STYLE_BINDING_OUTLINECOLOR].index]);
}
if(style->bindings[MS_STYLE_BINDING_OUTLINEWIDTH].index != -1) {
@@ -194,12 +194,12 @@
}
if(label->bindings[MS_LABEL_BINDING_COLOR].index != -1) {
- MS_INIT_COLOR(label->color, -1,-1,-1);
+ MS_INIT_COLOR(label->color, -1,-1,-1,255);
bindColorAttribute(&label->color, shape->values[label->bindings[MS_LABEL_BINDING_COLOR].index]);
}
if(label->bindings[MS_LABEL_BINDING_OUTLINECOLOR].index != -1) {
- MS_INIT_COLOR(label->outlinecolor, -1,-1,-1);
+ MS_INIT_COLOR(label->outlinecolor, -1,-1,-1,255);
bindColorAttribute(&label->outlinecolor, shape->values[label->bindings[MS_LABEL_BINDING_OUTLINECOLOR].index]);
}
More information about the mapserver-commits
mailing list