mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Make new drawPath() code actually work.
This commit is contained in:
parent
b354e01f49
commit
dbdf75c998
1 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ var SvgExporter = this.SvgExporter = new function() {
|
||||||
var formatNumber = Base.formatNumber;
|
var formatNumber = Base.formatNumber;
|
||||||
|
|
||||||
function formatPoint(point) {
|
function formatPoint(point) {
|
||||||
return formatNumber(point._x) + ',' + formatNumber(point._y);
|
return formatNumber(point.x) + ',' + formatNumber(point.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAttributes(svg, attrs) {
|
function setAttributes(svg, attrs) {
|
||||||
|
@ -203,9 +203,9 @@ var SvgExporter = this.SvgExporter = new function() {
|
||||||
} else {
|
} else {
|
||||||
// c = relative curveto: handle1, handle2 + end - start, end - start
|
// c = relative curveto: handle1, handle2 + end - start, end - start
|
||||||
var end = point2.subtract(point1);
|
var end = point2.subtract(point1);
|
||||||
parts.push('c' + formatNumber(handle1),
|
parts.push('c' + formatPoint(handle1),
|
||||||
formatNumber(end.add(handle2)),
|
formatPoint(end.add(handle2)),
|
||||||
formatNumber(end));
|
formatPoint(end));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue