ZeroOmega/omega-web/img/icons/draw_omega.js

20 lines
500 B
JavaScript
Raw Normal View History

var drawOmega = function (ctx, outerCircleColor, innerCircleColor) {
ctx.globalCompositeOperation = "source-over";
ctx.fillStyle = outerCircleColor;
ctx.beginPath();
ctx.arc(0.5, 0.5, 0.5, 0, Math.PI * 2, true);
ctx.closePath();
ctx.fill();
if (innerCircleColor != null) {
ctx.fillStyle = innerCircleColor;
} else {
ctx.globalCompositeOperation = "destination-out";
}
ctx.beginPath();
ctx.arc(0.5, 0.5, 0.25, 0, Math.PI * 2, true);
ctx.closePath();
ctx.fill();
};