Hi,
I was wondering if there is a way to fill a polygon with a colour plus a small repeated SVG image to show what sort of area is represented, for example scrub-land maybe pale green with small tufts of grass marked on quite sparsely.
Regards,
Jonathan
Polygon Fill using SVG
Hi Jonathan,
I am not sure whether it can be implemented, we don’t have existing APIs for it.
But I think you can try to override DrawCore of your style, then try to draw on the GeoCanvas. I am sorry I hadn’t found related sample about that, but if you have any problem when try to implement that please let us know.
Regards,
Don
Don,
OK, I will have a look at that soon however, as it might be a bit more involved, I suspect I will move it down the task list a bit and come back to it later.
Thanks,
Jonathan
Hi Jonathan,
I am sorry I should miss something. Today I asked our developer and just knows we have a class named GeoTextureBrush should works for your requirement.
The description of it said: This class is used to fill an area with a image texture. For example, you may have a small bitmap that looks like marble, which you can then use to fill in an area feature.
Do you think that’s what you need?
Regards,
Don
Don,
It may do, from a quick read it looks like GetTextureBrush uses GeoImage and that expects images to be in TIFF format so I would need to convert the SVG images into TIFF images but that would be more of a C# problem than a ThinkGeo problem.
Thanks,
Jonathan
Hi Jonathan,
Yes you’re right, maybe you need to convert the data format before use it, or you can override the style to convert datasource format when render.
But I still wish that API should be helpful for you.
Any question please let us know.
Regards,
Don