Hatch Brush and VectorPoint

Topics: SharpMap v2.0
Dec 1, 2010 at 4:56 PM

Hi folks, i'm migrating an app from V0.9 to V2.0

I've few questions. (first questions of a long series :)

Il old version i used hatchbrush to fill symbol. Now in V2.0 there is new object SolidStyleBrush but i haven't found hatch brush support. Are there same ways to use hatchbrush?

Furterore I have heavly uses in V 0.9 VectorPoint patch to render points. I've tries to migrate this patch in V2.0 whitout success :)) Is there an alternative to render points with cross,triangle ecc.. symbols

Thaks for help

 

Alessandro

 

Coordinator
Dec 2, 2010 at 8:02 AM
Edited Dec 2, 2010 at 9:47 AM

hello aletoa,

the first one is simple, just

  • create a HatchStylePattern enumeration with the same entries as the GDI+ equivalent.
  • create a HatchStyleBrush class - deriving it from StyleBrush - (TextureBrush is missing as well) and give it the equivalent properties (Color -> StyleColor, etc)
  • Add specific Convert functions to the ViewConverter class in the rendering project you need.

I did not know that there was a VectorPoint patch, I'll dig into that when I find it.

Hth FObermaier

Update: I'm not able to find the patch you mentioned.

Dec 2, 2010 at 10:32 AM

hello Fobermaier

thanks for hatchbrush solution, i've followed your suggest and now it's ok

Sorry I made a mistake with patch name. I meant PointStyle patch, at this link:

http://sharpmap.codeplex.com/workitem/9419

It's usefull to render points using simple base geometries (circle,triangle,ecc..)

I've also another problem. I've used widely in V09 Theme objects. In V20 Theme isn't a layer's property and I don't understand how to tell layer to use theme . I've also created new themes to implements MapObject2.0 ClassBreakTheme and ValueTheme. If it's interesting i could send source file.

My app is a geomarketing dashboard originally developed in MO 2.0 I was migrating it in V 09 when, in the middle of work, i realized to need functionality developed in V20. So we are :)

 Last question. Is avaible same doc about V20?

Thank again

Coordinator
Dec 2, 2010 at 10:57 AM

Hello aletoa,

any contribution is much appreciated (Themes, HatchStyleBrush, etc.)

Theme is a property of FeatureLayer. If it is not, where did you get the source from?

Unfortunately there isn't much documentation on sharpmap v2.0, just what is in the source.

Threre are three files for download, which seem to contain the same files. Which one is the one you are using?

Hth FObermaier

Dec 2, 2010 at 12:08 PM

Hallo FObermaier,

I've used PointStyles V3.zip

Probably i was using an old version. I got last version and Theme property is in the right place :)

When i finish to migrate from v09 to v2 and to test code i will send you new themes togheter with hatchsharpbrush.

Tanks 

Aletoa