for example, I would like to fill polygons with red cross, and empty background?
with blue horizontal lines, and yellow background?
is there a default background (black)?
Example of GeoHatchBrush?
guangming,
Would you please try the below area setting?
AreaStyle areaStyle = new AreaStyle();
GeoHatchBrush brush = new GeoHatchBrush(GeoHatchStyle.Cross, GeoColor.SimpleColors.Red, GeoColor.FromArgb(0, GeoColor.SimpleColors.Yellow));
//GeoHatchBrush brush = new GeoHatchBrush(GeoHatchStyle.Horizontal, GeoColor.SimpleColors.Blue, GeoColor.FromArgb(255, GeoColor.SimpleColors.Yellow));
areaStyle.Advanced.FillCustomBrush = brush;
Let us know if any questions.
Troy
got it. thanks,
what does this suppose to draw? myAreaStyle.Advanced.FillCustomBrush = new GeoHatchBrush(GeoHatchStyle.Percent80, GeoColor.SimpleColors.Red, GeoColor.SimpleColors.Transparent);
I got red background with a grid of white dots? correct?
I expect red background with 80% transparency.
guangming,
The result you got is correct. For a red background with 80% transparency, please try the below codes:
areaStyle.Advanced.FillCustomBrush = new GeoHatchBrush(GeoHatchStyle.Percent80, GeoColor.FromArgb((255*0.8), GeoColor.SimpleColors.Red), GeoColor.SimpleColors.Transparent);
Thanks,
Troy
how to get rid of the white dots?
Another style?
guangming,
I think the white dots is one part of the GeoHatchStyle. If we want to get rid of it, we can simply use the general areastyle to fill red color with an 80% transparency. Some codes like below:
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb((int)(255 * 0.8), GeoColor.StandardColors.Red));
Thanks,
Troy
thanks, that works
Guangming,
Good to hear it helps.
Thanks,
Troy
Guangming,
Glad to hear it works.
Thanks,
Troy