我想在转换为Canvas的图像上使用PaperJs绘制上面的内容,是否有人能指向正确的方向?
答案 0 :(得分:0)
您可以关注nice tutorials,尤其是ones about paths。
paper.install(window);
window.onload = function() {
paper.setup('myCanvas');
var myPath = new Path();
myPath.strokeColor = 'black';
myPath.add(new Point(0, 0));
myPath.add(new Point(100, 50));
myPath.lastSegment.handleIn = new Point(50,80);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.10.2/paper-core.min.js"></script>
<canvas id="myCanvas"></canvas>