Layer.Style.Fill semitransparent?

Topics: General Topics, SharpMap Project, SharpMap v2.0, WinForms Controls
Aug 21, 2008 at 6:18 AM
Hi everyone,

i'm new to sharpMap. I try to combine multipe vector-layers (lines, polygons ...). Is there any chance to get the fill-Property of  Layer.Style semitransparent?

Or is a different solution out there to visualize my vector-stuff semitransparent (over a raster-image)?
My only idea is to create multiple map-instances and to merge that output with rasteroperations to a new Image.


Thanks for your help

tom
Coordinator
Sep 3, 2008 at 5:16 PM
Hi ksk_tom, you need to set the alpha part of the StyleColor
 eg: layer.Style.Fill = new StyleBrush(StyleColor.FromBgra(red, green, blue, alpha))

where alpha is an int between 0 and 255 (0 is totally transparent, 255 is totally opaque) hth jd
Sep 4, 2008 at 10:22 AM
Thanks a lot!