[Jprogramming] Irregularly shaped buttons
bob therriault
bobtherriault at mac.com
Sat May 12 03:00:56 HKT 2012
Hi Ian,
Clickable maps often use SVG (Scalable Vector Graphics) which conforms with JavaScript, HTML5 and by extension might be used with JHS in the same way that HTML is currently used.
Cheers, bob
On 2012-05-11, at 9:41 AM, Ian Clark wrote:
> To save me reinventing the wheel, has anybody written routines to act
> on mouseclicks inside irregularly-shaped "buttons"?
>
> Techniques I'm considering:
>
> ++ Detecting if a point is inside an arbitrary polygon
>
> ++ Unions and differences of rectangles, triangles and sectors
>
> ++ Color of the pixel under the cursor
>
> If it works on a simple map of the USA, it'll probably work for my purpose.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list