var pattern = createPattern(imageObject,repeat)
Creates a reusable pattern (object).
The object can be assigned to any strokeStyle and/or fillStyle.
Then stroke() or fill() will paint the Path with the pattern of the object.
Arguments:
imageObject is an image that will be used as a patter...