From a0ba7eb10cd59d605a6109c0bb25976f8f0e6bd4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 22 Aug 2011 12:27:06 -0600 Subject: [PATCH] doc clarifications --- collects/scribblings/draw/bitmap-dc-class.scrbl | 9 ++++++--- collects/scribblings/draw/svg-dc-class.scrbl | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/scribblings/draw/bitmap-dc-class.scrbl b/collects/scribblings/draw/bitmap-dc-class.scrbl index eff6c26bd4..08dd5058ca 100644 --- a/collects/scribblings/draw/bitmap-dc-class.scrbl +++ b/collects/scribblings/draw/bitmap-dc-class.scrbl @@ -62,16 +62,19 @@ Gets a rectangle of pixels in the bitmap, subject to the same rules same method directly, so it is not necessary to select a bitmap into a DC to extracts its pixel values. -The pixel RGB values are copied into @racket[pixels]. The first byte +The pixel RGB values and alphas are copied into @racket[pixels] + (or just alpha values if @racket[just-alpha?] is true). The first byte represents an alpha value of the pixel at (@racket[x], @racket[y]), the second byte represents a red value of the pixel at (@racket[x], - @racket[y]), the third byte is the blue value, etc. In this way, the + @racket[y]), the third byte is the green value, etc. In this way, the first @math{@racket[width] * @racket[height] * 4} bytes of @racket[pixels] are set to reflect the current pixel values in the DC. The pixels are in row-major order, left to right then top to bottom. -If @racket[just-alpha?] is false, if the bitmap does not have an alpha +If the bitmap has an alpha channel, then the alpha value for each pixel + is always set in @racket[pixels]. + If @racket[just-alpha?] is false and the bitmap does not have an alpha channel, then the alpha value for each pixel is set to 255. If @racket[just-alpha?] is true, then @italic{only} the alpha value is set for each pixel; if the bitmap has no alpha channel, then the alpha diff --git a/collects/scribblings/draw/svg-dc-class.scrbl b/collects/scribblings/draw/svg-dc-class.scrbl index 6b30d0ac5f..f917d1d5d6 100644 --- a/collects/scribblings/draw/svg-dc-class.scrbl +++ b/collects/scribblings/draw/svg-dc-class.scrbl @@ -6,6 +6,8 @@ Similar to @racket[post-script-dc%], but generates a SVG (scalable vector graphics) file instead of a PostScript file. +@|PrintNote| + @defconstructor[([width (and/c real? (not/c negative?))] [height (and/c real? (not/c negative?))] [output (or/c path-string? output-port?)]