Depends on what map do you have in your mind. If a simple schematic map,
I would suggest to spend some initial time to make a polygon for each
canton (a set of x,y coords).
Then use fillPolygon method in Graphics to draw cantons.
Patrick Baeyens:
>I need to fill parts of a bitmap, representing European country's
>electional cantons, with different colors, one per canton. I would
>like to know what would be the best way to do it on a pure java awt
>environment.
Call getGraphics on your image and use the draw functions of the
Graphics(2D) object you received this way.
Regards,
Marco

Signature
Please reply in the newsgroup, not by email!
Java programming tips: http://jiu.sourceforge.net/javatips.html
Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
Patrick Baeyens - 09 Dec 2003 08:38 GMT
> Patrick Baeyens:
>
[quoted text clipped - 8 lines]
> Regards,
> Marco
Thanks for the suggestion. This would mean I would first have to
convert my map of the country, which is white with the canton limits
in black, to a polygon map manually and then fill the polygons. Is
there any way I can do a fill operation straight on the bitmap (as in
paintshop-like programs) using java awt or any open source package?
Thanks,
Patrick