Need help with graphics please

Hi All, I need help please, I am happy how my project has shaped up with Xojo so far, but there is the challenge, I am no software expert so may be you experts have some real solution. My project displays city maps with borders around suburbs, I want ability for user to select a suburb on map (this should highlight suburb - colour coded, not the complete map), then user need to tag it based on different scenarios, these scenarios would reflect as symbols on the selected portion.

I don’t know if xojo is capable of doing this? any plugins i need or is it something that needs extensive coding, i am okay with learning but i could not find any resources related to this.

Please help. Thanks in advance.

Hi Wahed,
sure you can with Xojo.

As a first idea (I bet others will have better ones) I would build a copy of the maps with the suburb areas filled with a different color each. Upon clicking the map, I would check the colors of the x,y mouse position but on this invisible copy, and translating the color found back to the suburb ID that corresponds to that color.
If you hold each suburb on a different object, you can copy it to your visible map canvas and use it to color fill the area.

or if your map is static (ie… you are using just one or two specific maps)
then manually create an array of polygons, where each polygon represents the outline of a suburb.
then when the user clicks a specific area, draw that polygon with a transluncent fill color over the map

This reduces the number of maps involved, as well as the graphics overhead

Thanks for the replies

@Ulrich - I will give it a go, it makes sense to me

@Dave -I am not too sure how translucent colouring works, is there any function to achieve this?

Thanks again.

Check out the transparency property in the graphics class in Xojo’s language reference. You can use the alpha value for all drawings, meaning this would be possible with pictures (if you use those) as well.

Thanks Ulrich, great help… Appreciate it.