As you can see in my image below my canvas pathing is kind of pixelated or like not smooth. I would like to know if there is a way to smooth them out?
Effective Code Block:
if (this.shade.color.topTrim) {
var toptrim = new Image();
toptrim.onload = function() {
for (i = 0; i < c.length; i++) {
var canvas = c[i];
var ctx = canvas.getContext("2d");
var pattern = ctx.createPattern(toptrim, "repeat");
ctx.beginPath();
ctx.moveTo( ( 150 - ( ProductDesigner.shade.model.radius / 2 ) ) , 80 );
ctx.quadraticCurveTo( 150 , 70, 150 + ( ProductDesigner.shade.model.radius / 2 ), 80);
ctx.lineTo( 150 + ( ProductDesigner.shade.model.radius / 2 ), 83 );
ctx.quadraticCurveTo( 150 , 73, 150 - ( ProductDesigner.shade.model.radius / 2 ), 83);
ctx.fillStyle = pattern;
ctx.fill();
ctx.closePath();
}
}
toptrim.src = "/wp-content/plugins/productdesigner/assets/Trimmings/" + this.shade.color.topTrim + ".jpg";
} else {
for (i = 0; i < c.length; i++) {
var canvas = c[i];
var ctx = canvas.getContext("2d");
ctx.beginPath();
ctx.moveTo( ( 150 - ( ProductDesigner.shade.model.radius / 2 ) ) , 80 );
ctx.quadraticCurveTo( 150 , 70, 150 + ( ProductDesigner.shade.model.radius / 2 ), 80);
ctx.lineTo( 150 + ( ProductDesigner.shade.model.radius / 2 ), 83 );
ctx.quadraticCurveTo( 150 , 73, 150 - ( ProductDesigner.shade.model.radius / 2 ), 83);
ctx.closePath();
ctx.stroke();
}
}