Re: Drawing a Graphice Segment

2015-07-29 Thread Terence Heaford
> On 29 Jul 2015, at 13:06, hh wrote: > > Sorry, you are wrong. My function returns false Apologies, I was incorrect. It does return false. My issue was the pie segments are in a group that was not receiving mouseUp messages. I placed a rectangle graphic to the size of the group behind the o

Re: Drawing a Graphice Segment

2015-07-29 Thread Mike Bonner
Someone else pointed out that if you set up the name of the objects that are allowed to hilite so that they're named similarly, you can filter out anything you don't want to hilite In the example I saw that someone did, they had added something like this.. if not (the short name of grc i contains

Re: Drawing a Graphice Segment

2015-07-29 Thread hh
> On 29 Jul 2015, at 13:22, Terence Heaford wrote: >> On 29 Jul 2015, at 10:32, hh wrote: >> There is one "uncertainty by default", the border, that is drawn with half >> of the lineSize outside the object. LC is also sloppy with the rect of >> objects with large lineSizes. > > Yes, this see

Re: Drawing a Graphice Segment

2015-07-29 Thread Terence Heaford
> On 29 Jul 2015, at 10:32, hh wrote: > > There is one "uncertainty by default", the border, that is drawn with half of > the lineSize outside the object. LC is also sloppy with the rect of objects > with large lineSizes. Yes, this seems to be the sticking point with all methods, the functio

Re: Drawing a Graphice Segment

2015-07-29 Thread hh
The function below determines for any point (x,y) whether it is within an oval graphic or not. You may add your own criteria like colour or fill/transparency or visibility ... There is one "uncertainty by default", the border, that is drawn with half of the lineSize outside the object. LC is al

Re: Drawing a Graphice Segment

2015-07-29 Thread Terence Heaford
ng-geometry-td4037520.html > > funny to read this thread from 2011. > > Kind regards > Bernd > > > > -- > View this message in context: > http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694408.html > Sent from

Re: Drawing a Graphice Segment

2015-07-28 Thread BNig
load/mouseover_mod.livecode"; > > Regards, > > Scott Rossi > Creative Director -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694409.html Sent from the Revol

Re: Drawing a Graphice Segment

2015-07-28 Thread BNig
Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694408.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode

Re: Drawing a Graphice Segment

2015-07-28 Thread Klaus major-k
Hi friends, > Am 28.07.2015 um 09:28 schrieb Terence Heaford : >> On 27 Jul 2015, at 22:27, Scott Rossi wrote: >> Just to beat the horse a bit more, > And another based on mathematics. > When you create the pie chart segments you know the start angle and end > angle, so save them with the segmen

Re: Drawing a Graphice Segment

2015-07-28 Thread Terence Heaford
> On 27 Jul 2015, at 22:27, Scott Rossi wrote: > > Just to beat the horse a bit more, And another based on mathematics. When you create the pie chart segments you know the start angle and end angle, so save them with the segment. In my case I use uStartAngle and uEndAngle. Then apply usi

Re: Drawing a Graphice Segment

2015-07-27 Thread Scott Rossi
Just to beat the horse a bit more, here's a stripped down version of Mike's approach that seems to work as expected (LC 7.0.5). In your message box: go url "http://www.tactilemedia.com/download/mouseover_mod.livecode"; Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 7/2

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
And yeah. chartmaker might be just the ticket. On Mon, Jul 27, 2015 at 2:26 PM, Mike Bonner wrote: > Heres a solution to the "more than one hilites" issue, that works pretty > well. https://dl.dropboxusercontent.com/u/11957935/mouseover.livecode > > On Mon, Jul 27, 2015 at 2:08 PM, Peter Haworth

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
Heres a solution to the "more than one hilites" issue, that works pretty well. https://dl.dropboxusercontent.com/u/11957935/mouseover.livecode On Mon, Jul 27, 2015 at 2:08 PM, Peter Haworth wrote: > Wondering if you know about ChartMaker, available at the Livecode store for > $79. Might save yo

Re: Drawing a Graphice Segment

2015-07-27 Thread Peter Haworth
Wondering if you know about ChartMaker, available at the Livecode store for $79. Might save you a lot of grief for a fairly small outlay. On Mon, Jul 27, 2015 at 1:01 PM Terence Heaford wrote: > Hi again, > > A screenshot here of the graphic behind the pie chart. if I give it a > border that is

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
Hi again, A screenshot here of the graphic behind the pie chart. if I give it a border that is slightly larger than the pie then when the mouse crosses the border the segment colour reverts back to it’s original colour. https://dl.dropboxusercontent.com/u/98788898/LiveCode/Screen%20Shot.png <

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
Just placed a rectangular graphic behind the pie chart and set it to opaque and visible and when I move the pointer out of the chart/segment the segment reverts to original colour. Whether this behaviour will change or not I don’t know but will experiment further. All the best Terry > On 27

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
> On 27 Jul 2015, at 20:29, Mike Bonner wrote: > > Still confused. I can copy my graphics to your stack and they work. I can > copy your graphics and script to my stack and they don't work. (no errors, > just.. no intersects detected) Yes. Its weird. Your confused, my heads spinning :) A

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
If I move my grc's to your stack, they work in your stack. And it seems to me, when I was messing with intersect in the past, if you had 2 graphics, and they intersected with standard graphics, and no worry about things, if there were opaque pixels that intersected, it worked. So, I think there is

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
Rather a lot of code that belongs in a group for creating Pie, Bar & Line Charts. There are probably many improvements that could be made to this as I am a beginner in this LC stuff so I am sure that it’s probably something I have done/not done. As I say, it’s the code belonging in a group tha

Re: Drawing a Graphice Segment

2015-07-27 Thread BNig
a look at the stroke gradients of the pie segments in my version of your stack. Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694384.html Sent from the R

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
Would you mind sharing your stack, or posting your code? I'm not seeing that behavior here, so now i'm curious. Also, Bernd, your stack works great for me. I tried opaque pixels with my original stack here and.. can't make it work. So I copied your script over in its entirety to my original sta

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
Here’s a movie of what I see. https://dl.dropboxusercontent.com/u/98788898/LiveCode/PieChartTest.mov All the best Terry > On 27 Jul 2015, at 19:40, Terence Heaford wrote: > > On my chart when the mouse leaves the segme

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
This would be a good solution for me because I want to actually display a field containing the segment data rather than highlight it green and when clicking outside of the segments hide the field although the green would be an added bonus. On my chart when the mouse leaves the segment/chart it d

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
> > > -- > View this message in context: > http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694378.html > Sent from the Revolution - User mailing list archive at Nabble.com. > > ___ > us

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
is fully opaque, >> which >> it is in Mike's example and now the border of the segments is not part of >> the segment. >> >> Kind regards >> Bernd >> >> >> >> -- >> View this message in context: >> http://runtime-revolu

Re: Drawing a Graphice Segment

2015-07-27 Thread BNig
I have sent you your stack that I modified by email. It works in 7.0.6 and 7.1 DP1 on a Mac. Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694378.html Sent from the Revolution - User mailing list

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
ot;opaque pixels") then -- cycle through > the graphics and check for intersect > --- > > of course this only works if the fill of the segments is fully opaque, > which > it is in Mike's example and now the border of the segments is not part of > the segment. > > Kind r

Re: Drawing a Graphice Segment

2015-07-27 Thread BNig
he segments is fully opaque, which it is in Mike's example and now the border of the segments is not part of the segment. Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Drawing-a-Graphice-Segment-tp4694331p4694376.html Sent from the Revol

Re: Drawing a Graphice Segment

2015-07-27 Thread Mike Bonner
Yeah, this was a very basic example, and it cycles through all graphic objects (except the first).. If you want it to only allow one to hilite, it would take a little extra coding to reset the previous hilite back to normal, and hilite the newest.. Or something of that nature. (i'd have to think o

Re: Drawing a Graphice Segment

2015-07-27 Thread Terence Heaford
> On 25 Jul 2015, at 22:37, Mike Bonner wrote: > > Added some tweaks to make it function better, it works pretty well now, Try > re-downloading for the newest version. > https://dl.dropboxusercontent.com/u/11957935/mouseover.livecode > Finally got it to work, however…. I have noticed if you

Re: Drawing a Graphice Segment

2015-07-26 Thread Scott Rossi
Lock/unlock helps significantly here when showing the feedback and dramatically improves the "feel" of the behavior. Might just be slower hardware. On a related but separate note, I also ran into some weird issue when doing experiments with mouseColor() causing recursion in LC 7.0.5. Apparently m

Re: Drawing a Graphice Segment

2015-07-26 Thread Mike Bonner
Will the lock/unlock actually help when the little pinpoint graphic isn't set to visible? Also, I was just thinking, the way I set things up I set the invisible graphic that follows the mouse as the backmost object so that I could then start my grc check loop at 2. Depending on your needs you mig

Re: Drawing a Graphice Segment

2015-07-26 Thread Scott Rossi
Works fine here. Note that you'll likely get snappier performance by locking/unlocking the screen at the beginning and end of the mouseMove handler, as LC 7 can be pretty slow to natively update the screen. Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 7/26/15, 11:36

Re: Drawing a Graphice Segment

2015-07-26 Thread J. Landman Gay
On 7/26/2015 1:17 PM, Terence Heaford wrote: I filled the arc with 125,78,158 and mouseColor returned 125,79,158 Thus the test failed. Why this happened I don’t know? It could be the anti-aliasing. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software

Re: Drawing a Graphice Segment

2015-07-26 Thread Mike Bonner
Hmm. Let me look. You did set up the one graphic (I used a line sized 2x2, set to invis) and have it follow the mouse around, right? And no, as far as I can tell a group makes no difference. If you see from my test stack I have one tiny grc named "mousepoint" and the first line of the mousemove

Re: Drawing a Graphice Segment

2015-07-26 Thread Terence Heaford
> On 25 Jul 2015, at 22:37, Mike Bonner wrote: > > Added some tweaks to make it function better, it works pretty well now, Try > re-downloading for the newest version. Is there any reason this would not work when the graphics are contained in a group as I can’t get it to work? Thanks Terr

Re: Drawing a Graphice Segment

2015-07-26 Thread Terence Heaford
> On 25 Jul 2015, at 19:44, J. Landman Gay wrote: > > The color test should work if you don't use a gradient or other graphic > effects, just a solid fill. The color test does not work consistently. For example: I filled the arc with 125,78,158 and mouseColor returned 125,79,158 Thus the

Re: Drawing a Graphice Segment

2015-07-25 Thread Mike Bonner
Added some tweaks to make it function better, it works pretty well now, Try re-downloading for the newest version. https://dl.dropboxusercontent.com/u/11957935/mouseover.livecode On Sat, Jul 25, 2015 at 3:28 PM, Mike Bonner wrote: > Hey Terry, heres a working example of the method I mentioned if

Re: Drawing a Graphice Segment

2015-07-25 Thread Mike Bonner
Hey Terry, heres a working example of the method I mentioned if you'd like to try it. https://dl.dropboxusercontent.com/u/11957935/mouseover.livecode On Sat, Jul 25, 2015 at 12:44 PM, J. Landman Gay wrote: > On 7/25/2015 5:41 AM, Terence Heaford wrote: > >> I want to only receive a mouseEnter &

Re: Drawing a Graphice Segment

2015-07-25 Thread Terence Heaford
> On 25 Jul 2015, at 19:44, J. Landman Gay wrote: > > Or you might be able to do something fancy by faking a pie slice using a > freehand graphic with lots of points along the curved edge, but that's more > math than I can do. I have been giving this a little thought and think it’s achievab

Re: Drawing a Graphice Segment

2015-07-25 Thread J. Landman Gay
On 7/25/2015 5:41 AM, Terence Heaford wrote: I want to only receive a mouseEnter & mouseLeave when the mouse leaves the coloured segment not the overall rect used in creating the segment. This happens automatically if the graphic is a filled, opaque polygon. It also works with an oval if the a

Re: Drawing a Graphice Segment

2015-07-25 Thread Mike Bonner
Would something like this work? I set up a pixel sized graphic and have it follow the mouseloc. Set the visible of it to false so you don't see a little dot trailing after the mouse, then use intersect to check when the pixel is over a non-transparent part of a graphic. on mousemove set the loc

Re: Drawing a Graphice Segment

2015-07-25 Thread Terence Heaford
Thanks for the suggestion. I have tried it and sometimes it works but on other occasions not. When I display the mouseColor against the check colour sometimes they are different. I have assumed they are different because all the pixels in a given segment on the screen are not the same colour?

Re: Drawing a Graphice Segment

2015-07-25 Thread dunbarx
deeper attributes of LC. I cannot remember who or how. But someone will chime in... Craig Newman -Original Message- From: Terence Heaford To: How to use LiveCode Sent: Sat, Jul 25, 2015 6:42 am Subject: Drawing a Graphice Segment When I draw a graphic segment with something like below

Drawing a Graphice Segment

2015-07-25 Thread Terence Heaford
When I draw a graphic segment with something like below how do I use mouseEnter & mouseLeave. I want to only receive a mouseEnter & mouseLeave when the mouse leaves the coloured segment not the overall rect used in creating the segment. private Command drawASegment tLeft,tTop,tRight,tBottom,tR