(clamp item min-val max-val)
Makes sure item is between min-val and max-val, clamping it to that range if necessary.
Makes sure item is between min-val and max-val, clamping it to that range if necessary.
(denorm-color c)
Inverse function for norm-color, transforms colors from [0, 1] to [0, 255].
Inverse function for norm-color, transforms colors from [0, 1] to [0, 255].
(get-masked-pixel color)
Make sure alpha is always 1. This allows writing out the image and checking the result but still ensures we are ignoring alpha which should have been multiplied through by this stage of the pipeline
Make sure alpha is always 1. This allows writing out the image and checking the result but still ensures we are ignoring alpha which should have been multiplied through by this stage of the pipeline
(norm-color c)
Transform a color intensity from [0, 255] to [0, 1].
Transform a color intensity from [0, 255] to [0, 1].
(pack-pixel data)
(pack-pixel r g b a)
Converts RGBA values to a single integer representing the color.
Converts RGBA values to a single integer representing the color.
(unpack-pixel px)
Returns [R G B A]. Note that java does not have unsigned types so some of these may be negative
Returns [R G B A]. Note that java does not have unsigned types so some of these may be negative
(with-unpacked-pixel px & body)
Unpack a color integer into RGBA values and bind them to r, g, b, and a variables locally.
Unpack a color integer into RGBA values and bind them to r, g, b, and a variables locally.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close