Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle line styles with outline colors differently when setting a hil…
…ite color.
  • Loading branch information
sdlime committed Dec 16, 2019
1 parent 0e2b1b3 commit d0c31fb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mapdraw.c
Expand Up @@ -1377,6 +1377,11 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
colorbuffer[i] = layer->class[i]->styles[0]->outlinecolor; /* if no color, save the outlinecolor from the BOTTOM style */
layer->class[i]->styles[0]->outlinecolor = map->querymap.color;
}
} else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) { /* alter BOTTOM style for lines with outlines */
if(MS_VALID_COLOR(layer->class[i]->styles[0]->color)) {
colorbuffer[i] = layer->class[i]->styles[0]->color; /* save the color from the BOTTOM style */
layer->class[i]->styles[0]->color = map->querymap.color;
} /* else ??? */
} else if (layer->class[i]->numstyles > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color)) {
colorbuffer[i] = layer->class[i]->styles[layer->class[i]->numstyles-1]->color; /* save the color from the TOP style */
Expand All @@ -1388,7 +1393,7 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
} else if (layer->class[i]->numlabels > 0) {
colorbuffer[i] = layer->class[i]->labels[0]->color;
layer->class[i]->labels[0]->color = map->querymap.color;
}
} /* else ??? */

mindistancebuffer[i] = -1; /* RFC77 TODO: only using the first label, is that cool? */
if(layer->class[i]->numlabels > 0) {
Expand Down Expand Up @@ -1496,6 +1501,9 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
layer->class[i]->styles[0]->color = colorbuffer[i];
else if(MS_VALID_COLOR(layer->class[i]->styles[0]->outlinecolor))
layer->class[i]->styles[0]->outlinecolor = colorbuffer[i]; /* if no color, restore outlinecolor for the BOTTOM style */
} else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[0]->color))
layer->class[i]->styles[0]->color = colorbuffer[i];
} else if (layer->class[i]->numstyles > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color))
layer->class[i]->styles[layer->class[i]->numstyles-1]->color = colorbuffer[i];
Expand Down

0 comments on commit d0c31fb

Please sign in to comment.