[racket] Opacity of borders in slideshow/pict

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Jun 10 12:59:29 EDT 2012

I think it does, actually. What's happening is that it is drawing the
interior with the specified alpha value and then drawing the border
with the specified alpha, which means that pixels near the border are
drawn twice and so appear twice as dark.

I've just pushed a change so that you can pass the #:draw-border?
argument to disk and filled-ellipse to avoid drawing the border.

Robby

On Sun, Jun 10, 2012 at 8:46 AM, Jens Axel Søgaard
<jensaxel at soegaard.net> wrote:
> It seems the "borders" of disks and filled ellipses doesn't respect
> the opacity given by cellophane.
>
> This draws an yellow disk overlapping a gren disc.
> The opacity of the border of the disk is different than
> the interior.
>
> Is this the intended behaviour?
> If so how can set the opacity of the border?
>
> /Jens Axel
>
>
> #lang racket
> (require slideshow/pict
>         racket/draw)
>
> (define (find-color color-symbol)
>    (let ([color-name
>           (string-downcase
>            (symbol->string color-symbol))])
>      (send the-color-database find-color color-name)))
>
> (pin-over (colorize (disk 50) (find-color 'green))
>          25 0
>          (cellophane
>           (colorize (disk 50) (find-color 'yellow)) 0.7))
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users
>


Posted on the users mailing list.