chickadee » macaw » rgb-pointer

rgb-at float*_pointer #!optional parentprocedure
rgb-pointer rgb_1procedure
set! (rgb-pointer rgb_1) float*_pointersetter
rgb-parent rgb_1procedure
set! (rgb-parent rgb_1) parentsetter

rgb-at creates an rgb color which reads and writes to the memory at pointer, which can be a pointer or a locative. The memory starting at pointer must contain four 32-bit floats in the order r, g, b, a. You can use rgb-pointer to get or set the pointer.

The optional parent can be any object that the color depends on. This reference prevents the parent from being garbage collected while the color is still accessing the parent's memory.