尝试获取以下代码以启动一个新路径,但没有运气...提前致谢
mousemoveHandler: function(inSender, e) {
if ( (this.owner.dragging) && (this.hasNode()) ) {
var can = this.node;
var ctx = can.getContext('2d');
//ctx.beginPath();
//c.fillStyle = "blue";
//ctx.fillRect(e.offsetX,e.offsetY,10,10);
ctx.lineWidth = 3;//BRUSH WIDTH
ctx.lineJoin = 'round';//round miter bevel
ctx.lineCap = 'round';//butt round square
ctx.strokeStyle = '#AB1616';
ctx.lineTo(e.offsetX,e.offsetY);
ctx.stroke();
ctx.restore();
}
},
mousedownHandler: function(inSender, e){
if ((this.owner.dragging) && (this.hasNode())) {
ctx.beginPath();
ctx.moveTo(e.offsetX,e.offsetY);
}
}