Fabricjs画布任何形状

时间:2017-05-16 05:08:04

标签: html5-canvas fabricjs

我如何实现挂钟定制?我需要更改画布形状并限制画布形状内的对象。可能吗?帮助我。例如,

var canvas = new fabric.Canvas('canvas');
var w, h;
var ctx = canvas.getContext('2d');
w = canvas.width / 2;
h = canvas.height / 2;
ctx.save();
ctx.arc(w, h, 230, 0, Math.PI * 2,true);

0 个答案:

没有答案