Run Rev's within() function--Was: Problem with mask
Wilhelm Sanke
sanke at hrz.uni-kassel.de
Sat Oct 25 07:05:42 EDT 2008
James Hurley wrote:
> Wilheim,
>
> I see what you mean about the those flipping (no vulgarity intended)
> flat spots, depending on the direction of the scan, left to right, or
> right to left.
Just to find out what happens I tested all possible permutations of the
"scan direction" based on your script:
1. With your original setting
1 to tHeight
1 to tWidth
we get the edges on the RIGHT and BOTTOM.
2. Reversing the scan to from right to left
tHeight down to 1
tWidth down to 1
we get the edges on the LEFT and TOP.
3. With
1 to tHeight
tWidth down to 1
the edges appear on the LEFT and BOTTOM.
4. With
tHeight down to 1
1 to tWidth
the edges are on the RIGHT and TOP.
> I have no way to account for this. I suspect the flip flop must occur
> when setting the alphaData, but that is a wild guess.
Do you mean the generated mask would be totally round, only when
applying the mask the edge effects appear?
The "double mask" solution (3rd button in my "Three Masks" stack) seems
to contradict such an explanation. Combining the two first masks
(generated by permutations 1 and 2 above), i.e. first combining the
masks and then transferring the alphadata, apparently results in a
round mask and an oval without edges.
> I wrote a CARD script which seems to confirm that the TOP and LEFT of
> a rectangle are within (in the Run Rev within() fuction sense) while
> the right and bottom are not.
>
> If you create a square graphic, 100 units on a side and make it
> opaque, you will find if you click into the square and run the mouse
> over the square, that the two within functions (user defined and Run
> Rev defined) do agree on the RIGHT and BOTTOM but they do not agree
> on the TOP and LEFT. Of course they agree everywhere within the
> boundary.
>
> So the mystery goes on.
I get the same results with the square graphic (and your improved script
of your next post). Indeed, the mystery goes on.
Best regards,
Wilhelm
More information about the use-livecode
mailing list