* property and "uninstallPattern" method to this particular canvas context.
* You must call uninstallPattern() before calling installPattern() again.
*
* property and "uninstallPattern" method to this particular canvas context.
* You must call uninstallPattern() before calling installPattern() again.
*
* indices indicate a draw and odd indices indicate a gap (in pixels). The
* array should have a even length as any odd lengthed array could be expressed
* as a smaller even length array.
*/
CanvasRenderingContext2D.prototype.installPattern = function(pattern) {
* indices indicate a draw and odd indices indicate a gap (in pixels). The
* array should have a even length as any odd lengthed array could be expressed
* as a smaller even length array.
*/
CanvasRenderingContext2D.prototype.installPattern = function(pattern) {
if (typeof(this.isPatternInstalled) !== 'undefined') {
throw "Must un-install old line pattern before installing a new one.";
}
if (typeof(this.isPatternInstalled) !== 'undefined') {
throw "Must un-install old line pattern before installing a new one.";
}
this.uninstallPattern = function() {
this.beginPath = realBeginPath;
this.lineTo = realLineTo;
this.uninstallPattern = function() {
this.beginPath = realBeginPath;
this.lineTo = realLineTo;
CanvasRenderingContext2D.prototype.uninstallPattern = function() {
// This will be replaced by a non-error version when a pattern is installed.
throw "Must install a line pattern before uninstalling it.";
CanvasRenderingContext2D.prototype.uninstallPattern = function() {
// This will be replaced by a non-error version when a pattern is installed.
throw "Must install a line pattern before uninstalling it.";