drawPattern(pattern, x, y, width, height) {
		if (this.getGlobalAlpha() < 1 / 255) {
			// Fast path: don't draw fully transparent
			return;
		}
		const context = this.getContext();
		const fillStyle = context.fillStyle;
		context.fillStyle = pattern;
		context.fillRect(x, y, width, height);
		context.fillStyle = fillStyle;
	}
Draw a pattern within the given rectangle.
@param {CanvasPattern} pattern - Pattern object
@param {number} x
@param {number} y
@param {number} width
@param {number} height
@see CanvasRenderer#createPattern