If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
how to identify curve from array?
6 posts
• Page 1 of 1
how to identify curve from array?
hi all,
in my actual project i'm drawing curves with the graphic path, the points for the curve are coming from an array,
now i need to identify the array index which holds the curvepoints of the curve when the mouse pointer is over one of the curves.
there are 2 methodes which should make this possible, 'isVisible' and 'isOutlineVisible' - i just don't know how to use this methodes, i tried different variations but failed..
i know there were some examples in the forum once but with the absolutely useless search function the forum provides i couldn't find them can't this be fixed one day!!!
any help would be great
i attached a schematic which shows the basic idea
in my actual project i'm drawing curves with the graphic path, the points for the curve are coming from an array,
now i need to identify the array index which holds the curvepoints of the curve when the mouse pointer is over one of the curves.
there are 2 methodes which should make this possible, 'isVisible' and 'isOutlineVisible' - i just don't know how to use this methodes, i tried different variations but failed..
i know there were some examples in the forum once but with the absolutely useless search function the forum provides i couldn't find them can't this be fixed one day!!!
any help would be great
i attached a schematic which shows the basic idea
- Attachments
-
- outline visible.fsm
- (1.76 KiB) Downloaded 727 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: how to identify curve from array?
Nubeat7 wrote:hi all,
in my actual project i'm drawing curves with the graphic path, the points for the curve are coming from an array,
now i need to identify the array index which holds the curvepoints of the curve when the mouse pointer is over one of the curves.
there are 2 methodes which should make this possible, 'isVisible' and 'isOutlineVisible' - i just don't know how to use this methodes, i tried different variations but failed..
i know there were some examples in the forum once but with the absolutely useless search function the forum provides i couldn't find them can't this be fixed one day!!!
any help would be great
i attached a schematic which shows the basic idea
I made some modifications needed to make it work. You've created two GraphicsPaths but only one reference (@path). But isVisible/isOutlineVisible are methods of the GraphicsPath. The demonstration uses mousedown event to output the integer, since I started that way. But it shouldn't be a problem.
However, I found that both methods don't work as expected from me. Imagine a horizontal line, with that line isVisible only reports point in upper half, while isOutlineVisible reports point in lower half. Maybe one should tweak with the last parameter of both methods, which would be a view parameter. But I wanted to give you something at hand, without testing all too long.
- Attachments
-
- outline visible.fsm
- (1.81 KiB) Downloaded 719 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: how to identify curve from array?
I've posted an example that shows the difference between isOutlineVisible and isVisible long time ago:
viewtopic.php?f=2&t=1035#p2976
Here's a possible solution for your problem
viewtopic.php?f=2&t=1035#p2976
Here's a possible solution for your problem
- Attachments
-
- outline visible (MyCo).fsm
- (1.83 KiB) Downloaded 741 times
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: how to identify curve from array?
BTW: found another cool demo on my drive, not sure if I've posted this already. It's about 1 1/2 years old
- Attachments
-
- Curve Segment HitTest.fsm
- (120.61 KiB) Downloaded 750 times
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: how to identify curve from array?
thank you guys, this helped a lot.
the curve segment hit brought me directly to what i need, thanks myco for sharing and linking the thread.
the curve segment hit brought me directly to what i need, thanks myco for sharing and linking the thread.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: how to identify curve from array?
So, simply said, both only work on closed graphics paths. Good to know! Thanks, Myco!
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 64 guests