Drawing a Graphice Segment

dunbarx at aol.com dunbarx at aol.com
Sat Jul 25 13:37:24 CEST 2015


There were a couple of threads on this, detecting only the actual visible graphic instead of its bounding rect.


I remember suggesting using the mouseColor function with the mouseMove message, which probably works,, but there were more clever handlers offered, that took another tack using deeper attributes of LC. I cannot remember who or how. But someone will chime in...


Craig Newman



-----Original Message-----
From: Terence Heaford <t.heaford at icloud.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Sat, Jul 25, 2015 6:42 am
Subject: Drawing a Graphice Segment


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,tRadius,tStartAngle,tArcAngle,tColor
   lock screen

lock messages
   set the style of the templateGraphic to oval
   create grc in
me
   put the id of the last grc of me into tID
   set the antialiased of grc
id tID to true
   set the rect of grc id tID to tLeft,tTop,tRight,tBottom
  
set the startangle of grc id tID to tStartAngle
   set the arcangle of grc id
tID to tArcAngle
   set the backcolor of grc id tID to tColor
   set the
showFill of grc id tID to true
   set the forecolor of grc id tID to tColor
  
set the lineSize of grc id tID to 1
   set the locked of grc id tID to true  

   unlock messages
   unlock screen
end drawASegment


All the
best

Terry
_______________________________________________
use-livecode
mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe,
unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 


More information about the use-livecode mailing list