@instructure/quiz-interactions
Version:
A React UI component Library for quiz interaction types.
13 lines (12 loc) • 527 B
JavaScript
// Ellipse polyfill for ie11 based on https://github.com/google/canvas-5-polyfill
export function ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, antiClockwise) {
this.save();
this.translate(x, y);
this.rotate(rotation);
this.scale(radiusX, radiusY);
this.arc(0, 0, 1, startAngle, endAngle, antiClockwise);
this.restore();
}
if (typeof CanvasRenderingContext2D !== 'undefined' && !CanvasRenderingContext2D.prototype.ellipse) {
CanvasRenderingContext2D.prototype.ellipse = ellipse;
}