4.2 Functions
snip-class SNIPCLASS
This snipclass is used for saved cache image snips.
(make-argb (vectorof rational[between 0 & 255]) int) CONSTRUCTOR
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.
Extracts the vector from an argb
Extracts the width from an argb.
Tests if its argument is an argb.
(overlay-bitmap dx dy color-bitmap mask-bitmap) PROCEDURE
Builds a new argb after overlaying color-bitmap (with masking based on mask-bitmap) onto argb at (dx, dy) from the top-left.
(build-bitmap draw w h) PROCEDURE
Builds a bitmap with width w and height h, using
the procedure draw. The procedure should accept one
argument, dc<%>, and return void.
(flatten-bitmap bitmap) PROCEDURE
Builds a new bitmap that flattens the original bitmap with its mask, producing a bitmap that has no mask, and looks the way that bitmap would draw (when drawn with the mask).
(argb->cache-image-snip argb number number) PROCEDURE
Builds a new cache-image-snip% based on the
contents of argb, using the two numbers as the pinhole.
Builds a bitmap that draws the same way as argb; the alpha pixels are put into the bitmap's get-loaded-mask bitmap.