Functions
jCanvas allows you to use a user-defined function as the value for any fill or stroke style. The function accepts one argument: the parameters object passed into the method (or the layer object if the drawing is a layer).
Functions as fill/stroke styles can be useful for dynamic computation of those styles.
Notes
The return value of the given function will be used as the resulting fill/stroke style.