hi; I want to have an image on the screen and have relative regions within the image that are clickable hot-spots, with the following region types:
circle coords = "x,y,r"
rect coords = "x1,y1, x2,y2"
polygon coords = "x1,y1, ... "
how would I work out the polygon regions efficiently for mouse coords, the polygons can have many coords where do you start? I just can't get my head around this lol
If you need to understand better what I'm talking about it has to work the same way as HTML Image Maps..
I guess if anybody has done anything similar with flood filling a polygon shape then they could give pointers!!
Sorry if none of this seems worded properly, lack of sleep!
houston.
found a good method here if anybody is interested..
So are you talking about testing the mouse position against those clickable areas? Or drawing the shapes to the screen? For drawing it depends on your API, for example, some will have built in methods for drawing those shapes.
Ryan Pridgeon C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal Music | Blog
RyanPridgeon wrote:So are you talking about testing the mouse position against those clickable areas? Or drawing the shapes to the screen? For drawing it depends on your API, for example, some will have built in methods for drawing those shapes.
I knew I'd worded that badly lol.. Yes testing mouse position within the polygon!