doc clarification for make-argb

This commit is contained in:
John Clements 2012-05-08 12:00:34 -07:00
parent a8994c7261
commit 0196a6f97a

View File

@ -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?]{