Good day y'all!
I have a question...
How do I know if one object is within another object? (that they fully overlap)
I know "intersect", but it only tells when 2 objects collide, right?
Also, "within" only tells if a point is within an object, not object within the object.
Can't seem to find what to use.
And another question...
How do I tell if one object directly beside another object? By object, I mean controls with irregular shape. You can think of like I am trying to assemble pieces of something and I like to know if 2 pieces are connected. By connected I mean to say there shouldn't be any hollow/empty pixel between the two.
Thank you so much!
Any insights will be greatly appreciated.
Regards,
Genie
How do I know if one object is within another object?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: How do I know if one object is within another object?
Hi Genie
Best regards
Jean-Marc
You can use within for each point of your object. Points if this is an irregular polygon or topleft,topright... if this is an other objectHow do I know if one object is within another object? (that they fully overlap)
Also, "within" only tells if a point is within an object, not object within the object.
Best regards
Jean-Marc
https://alternatic.ch
Re: How do I know if one object is within another object?
Ohh, i see. Sound tedious...but thank you so much for your help jm. Now I know what to do!jmburnod wrote: You can use within for each point of your object. Points if this is an irregular polygon or topleft,topright... if this is an other object
Regards,
Genie
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: How do I know if one object is within another object?
Yes for the first part but what about the second ?Now I know what to do!
How do I tell if one object directly beside another object?
Best regards
Jean-Marc
https://alternatic.ch
-
- Posts: 192
- Joined: Tue Mar 11, 2014 12:57 pm
Re: How do I know if one object is within another object?
you could have invisible objects next to the visible - like a boundary. Then test for intersect e.g. a slightly larger invisible outer circle or a slightly larger invisible outer box.
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: How do I know if one object is within another object?
I stumbled across a function from the use-livecode list for this:
http://lists.runrev.com/pipermail/use-l ... 61156.html
http://lists.runrev.com/pipermail/use-l ... 61156.html
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn