Hatching Background

Steve Lime steve.lime at DNR.STATE.MN.US
Wed Dec 7 11:01:04 EST 2005


Abe: Could you post some samples? I'd like to see what 'ugly' means. Also,
have you tried setting TRANSPARENCY ALPHA on the layer being hatched?

Steve

>>> Abe Gillespie <abe.gillespie at GMAIL.COM> 12/06/05 8:29 PM >>>
I've got a symbol that does diagonal hatching.  This symbol is used to
do custom selecting outside MapServer's normal selection facilities (I
believe the custom selection is common for Chameleon apps).  This
symbol is defined as such:

Symbol
Name 'left slash'
Type VECTOR
TRANSPARENT 0
Points
0 0
1 1
END
END

And this symbol is applied on the fly with the following code:

$o_style = ms_newStyleObj($class);
$o_style->color->setRGB(255, 0, 0);
$o_style->outlinecolor->setRGB(0, 255, 0);
$o_style->set("symbol", 10);

This style object comes from a class object from a shapefile that is
dynamically created and added to the map and includes the shapes that
are currently selected.

The problem:
When the output mode of the image is set to "RGB" the hatch's
background is transparent and lets the map below show through the gaps
in the hatch.  But this means all the aerial photos are UGLY. 
However, when I set the image mode to "RGBA", the aerial photos are
beautiful, but the gaps in the hatch are solidly filled with white and
don't let the beautiful aerial photography (or anything else for that
matter) show through.

Any ideas?

Thanks.
-Abe



More information about the mapserver-users mailing list