From 0196a6f97a923fe571d0dd8eba8cdd8fe8dd8ebd Mon Sep 17 00:00:00 2001 From: John Clements Date: Tue, 8 May 2012 12:00:34 -0700 Subject: [PATCH] doc clarification for make-argb --- collects/mrlib/scribblings/cache-image-snip.scrbl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/collects/mrlib/scribblings/cache-image-snip.scrbl b/collects/mrlib/scribblings/cache-image-snip.scrbl index b725bf5672..43108bf5db 100644 --- a/collects/mrlib/scribblings/cache-image-snip.scrbl +++ b/collects/mrlib/scribblings/cache-image-snip.scrbl @@ -112,14 +112,19 @@ This snipclass is used for saved cache image snips.} [height exact-nonnegative-integer?]) argb?]{ - Constructs a new argb value. The vector has four entries - for each pixel, an alpha, red, green, and blue value. The - int specifies the width of the image; the height is the - size of the vector, divided by 4, divided by the width.} + Constructs a new argb value with the given width and height, + using the data in the vector. The vector has four entries + for each pixel, an alpha, red, green, and blue value. + The pixels are specified in row-major order, so that the + pixel at location (x,y) comes from vector entry (4*(x+(width*y))). +} @defproc[(argb-vector [argb argb?]) (vectorof (integer-in 0 255))]{ - Extracts the vector from @racket[argb].} + Extracts the vector from @racket[argb]. The resulting vector + has entries in row-major order, so that the data for the pixel + at (x,y) winds up in four vector entries beginning at + (4*(x+(width*y))).} @defproc[(argb-width [argb argb?]) exact-nonnegative-integer?]{