Drawing a Graphice Segment
bonnmike at gmail.com
Wed Jul 29 09:14:39 EDT 2015
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 "Oval") then next repeat
Put the line right after the beginning of the repeat loop.
Or name your segments "Pie 1" *Pie 2" etc, keep track of the number of
segments and then cycle through that way rather than all grc's in the list.
Or keep an array of created pie segments and their data and use that for
your check (as was done in the game academy)
If you remove the small loop I had that made sure to back up the default
color of a segment (since uColor is set up during your object creation)
you can check for the existence of uColor in the grc and "next repeat" if
it doesn't exist, unless other grcs on your page have uColor of course.
There are lots of ways (that are all basically the same) to have it ignore
graphics that you want to ignore.
On Wed, Jul 29, 2015 at 6:06 AM, hh <hh at livecode.org> wrote:
> > On 29 Jul 2015, at 13:22, Terence Heaford <t.heaford at icloud.com> wrote:
> >> On 29 Jul 2015, at 10:32, hh <hh at livecode.org> 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 function
> returns true if the point is within the rect.
> Sorry, you are wrong. My function returns false if it is not within the
> rect, as a first test. Then it does the additional checks.
> The handling of a point in the border can for example be tested if, for
> the check, the showBorder is temporarily set to false.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode