1. A computer-implemented method comprising: receiving a request to set an attribute to use a particular constant value by utilizing a first function; calling a second version of the first function; using the second version of the first function to store the particular constant value; setting the attribute to use the particular constant value; receiving a request to draw an image using a second function, the attribute, and a first array of N values; determining, by a processor, whether the attribute is set to use a constant value; and if the attribute is set to use a constant value: (1) generating, by the processor, a second array of at least N values based on the stored particular constant value; and (2) calling the second function to draw the image using the second array.