From d2fb0b8f7d78c97268f96a1b63400ca87fcc2a44 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 16 Dec 2010 21:20:10 -0700 Subject: [PATCH] further `draw-bitmap' doc improvements --- collects/scribblings/draw/dc-intf.scrbl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/collects/scribblings/draw/dc-intf.scrbl b/collects/scribblings/draw/dc-intf.scrbl index 4068f94e5d..5cc24d62b0 100644 --- a/collects/scribblings/draw/dc-intf.scrbl +++ b/collects/scribblings/draw/dc-intf.scrbl @@ -105,7 +105,7 @@ If a @racket[mask] bitmap is supplied, it must have the same width and height destination bitmap, otherwise @|MismatchExn|. The effect of @racket[mask] on drawing depends on the type of the -bitmap: +@racket[mask] bitmap: @; @itemlist[ @@ -114,12 +114,13 @@ bitmap: black pixels (independent of @racket[style], which controls how the white pixels of a monochrome @racket[source] are handled).} - @item{If @racket[mask] is color with an alpha channel, the alpha - channel only is used as the mask for drawing @racket[source].} + @item{If the @racket[mask] bitmap is color with an alpha channel, its + alpha channel is used as the mask for drawing @racket[source], + and its color channels are ignored.} @item{If the @racket[mask] bitmap is color without an alpha channel, the color components of a given pixel are averaged to arrive at - an @racket[alpha] value for the pixel. In particular, if the + an inverse alpha value for the pixel. In particular, if the @racket[mask] bitmap is grayscale, then the blackness of each mask pixel controls the opacity of the drawn pixel (i.e., the mask acts as an inverted alpha channel).} @@ -129,11 +130,11 @@ bitmap: The current brush, current pen, and current text for the DC have no effect on how the bitmap is drawn, but the bitmap is scaled if the DC has a scale, and the DC's alpha setting determines the opacity of the - drawn pixels (in combination with an alpha channel of @racket[bitmap] + drawn pixels (in combination with an alpha channel of @racket[source] and any given @racket[mask]). For @scheme[post-script-dc%] and @racket[pdf-dc%] output, opacity from - an alpha channel in @racket[bitmap] or from @racket[mask] is + an alpha channel in @racket[source] or from @racket[mask] is rounded to full transparency or opacity. The result is @scheme[#t] if the bitmap is successfully drawn,