further `draw-bitmap' doc improvements

This commit is contained in:
Matthew Flatt 2010-12-16 21:20:10 -07:00
parent 8a10c3d3db
commit d2fb0b8f7d

View File

@ -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,