Look this code, it work's.
paper.install(window);
paper.setup('draw');
var tool = new Tool();
tool.minDistance = 10;
var backgroundImg = new Raster({
source: 'images/myBackImg.jpg',
position: view.center
});
var path;
tool.onMouseDown = function(event) {
// Create a new path and give it a stroke color:
path = new Path();
path.strokeColor = '#00000';
// Add a segment to the path where
// you clicked:
path.add(event.point);
}
tool.onMouseDrag = function(event) {
// Every drag event, add a segment
// to the path at the position of the mouse:
path.add(event.point);
}
среда, 16 июля 2014 г., 10:49:58 UTC+4 пользователь Rishi Khandelwal написал: