CanvasPattern object
[This documentation is preliminary and is subject to change.]
Provides an object that contains a pattern for a canvas fill style by using an image or portion of an image.
![]() ![]() |
Standards information
- HTML Canvas 2D Context, Section 1
Remarks
To create a pattern from a portion of an image, create a temporary clip canvas and use drawImage to extract the piece. Then, pass the tempoarary canvas to the createPattern method.
See also
Build date: 2/14/2012

