On Fri, Jun 20, 2008 at 7:20 AM, _why <[EMAIL PROTECTED]> wrote:
> You were very, very close.
>
>  Shoes.app :width => 800, :height => 630 do
>
>    a = stack do
>      fill "#FFF"
>      stroke "#222"
>      rect(0,0,200,200)
>      stroke "#F00"
>      @r = rect(10,10,180,180)
>    end
>
>    keypress {|key|
>      @r.remove
>      append {
>        stroke "#222"
>        nofill
>        @r = rect(10,10,180,180)
>      }
>    }
>
>  end
>
> The trick is to remove the old rectangle and replace it with a new
> one.  It's not a problem with an alpha color.  It's just that when
> you pile up rectangles, the stroke appears to get thicker, since it
> is antialiased.

Ah - I see! One further question on the topic - why does this not work
when I put the @r.remove within the append {} block? (Why I'd like to
do this is so that the remove-change-colour-and-repaint sequence can
be in a method of its own invoked within the block)

martin

Reply via email to