Cannot click on the whole shape of a polygon

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
gilgml
Posts: 26
Joined: Wed Jun 16, 2021 3:35 am

Cannot click on the whole shape of a polygon

Post by gilgml » Mon Jul 26, 2021 12:24 pm

Hello to everybody !
Little problem, only the "corners", say the 'spikes' of a polygon triggers on mouse down.
I don't know if it is the standard behavior, or if there is a workaround...

Thanks in advance.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Cannot click on the whole shape of a polygon

Post by Klaus » Mon Jul 26, 2021 12:29 pm

Hi gilgml,

this is correct beahvior UNLESS you have checked OPAQUE for that graphic. :D


Best

Klaus

gilgml
Posts: 26
Joined: Wed Jun 16, 2021 3:35 am

Re: Cannot click on the whole shape of a polygon

Post by gilgml » Wed Jul 28, 2021 3:02 pm

Hi Klaus, thank you for the helping hand :D
It doesn't work, even with Opaque checked :(
Attachments
Capture d’écran 2021-07-28 à 16.00.31.png

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Cannot click on the whole shape of a polygon

Post by Klaus » Wed Jul 28, 2021 3:36 pm

Bonjour gilgml,

that is very strange, it works here with an OPAQUE polygon!? :shock:
macOS 10.14.6, LC 9.6.2.

Best

Klaus
polygon_click.jpg

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cannot click on the whole shape of a polygon

Post by dunbarx » Wed Jul 28, 2021 5:44 pm

Hi.

I see what Klaus sees, setting the "opaque" property allows a message to be sent when clicking on the interior of the shape. This has been true forever.

Know that a regular polygon has this property set by default, whereas the one you draw using the polygon graphic tool has the property cleared by default.

Mac OS.

Craig

gilgml
Posts: 26
Joined: Wed Jun 16, 2021 3:35 am

Re: Cannot click on the whole shape of a polygon

Post by gilgml » Wed Jul 28, 2021 6:50 pm

OK then.
Drew some others ( with polygon graphic tool ) ... it works.
The one not OK was badly 'drawned' ( the polygon circumference was not closed ( even one pix not closed ) )

Thank you for your support :)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cannot click on the whole shape of a polygon

Post by dunbarx » Wed Jul 28, 2021 10:26 pm

Hi.

When you set the opaque of a hand-drawn polygon, LC closes the shape. It adds one more line to "the points" property to do that, which is why clearing the opaque property does not restore the original open version. You would have to save those original points and restore manually.

I don't think you can have it both ways, that is, with a unclosed shape and opaque set. You can kludge this for visual effect in many ways, though. And I seem to remember a more direct method to have an open shape with its opaque set, but am not sure about that.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”