weird behavior

Alex Tweedly alex at tweedly.net
Mon Jul 19 09:25:14 EDT 2004


At 14:51 19/07/2004 +0200, Wouter wrote:


>On 18 Jul 2004, at 06:54, use-revolution-request at lists.runrev.com wrote:
>
>>Message: 19
>>Date: Sun, 18 Jul 2004 02:10:06 +0100
>>From: Alex Tweedly <alex at tweedly.net>

big snip

[ Transcript dictionary, as paraphrased (accurately, I think) by me ]

>>An open polygon has a blank last line
>>A closed polygon has the last line == first.
(might have been marginally more precise to say "last point == first")

You said:
>We have to reconsider the term <malformed polygon>.
>May be <malused polygon opacity property> is better in this case.

I'm not convinced. The description above requires that a polygon must meet 
one or other of the two conditions - and many "obvious" polygons will not 
satisfy either condition. No need to invoke the opacity of the polygon. 
Your original example had a non-blank last line containing a point which 
was not a duplicate of the first point - therefore was neither an open nor 
a closed polygon.

>The default setting of the opaque property of the templategraphic is true.
>If not altered all new polygons are of the "closed" type.
>Setting the opaque property to false for using "open" polygons and to true 
>for "closed" polygons,
>do you still consider this as a bug or a work around?

Not sure about whether it's a bug or not. As far as I can tell, all 
polygons which meet the description in the dictionary will be either 
"properly closed" or "properly open", and all will be drawn as you'd expect 
- both in opaque and transparent.

So I'm sure it's a deficiency to leave the definition of polygon so 
(needlessly) amenable to describing malformed ones - but not sure whether 
it's a bug or an opportunity for improvement.

The interaction of closed-ness with the opacity setting seems like a bug. 
If a script supplies a set of points which describe a malformed polygon, 
then that malformed polygon should be treated consistently, regardless of 
whether it is opaque or transparent. (Though of course it's better - and 
perfectly possible - to make it literally impossible to describe a 
malformed polygon.)

But I'm sure it could be better described in the documentation. And I'm 
sure that provided you know about malformed polygons (which I didn't until 
this discussion started - thanks) you can easily avoid any problems - so if 
it's a bug, it's a fairly minor one.

Cheers,
-- Alex.
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004


More information about the use-livecode mailing list