copies a node from (potentially some other) line to here. Also copies attributes. Cubic segments are reversed.
(Node node, Vec3 dest)
| 771 | } else if (node instanceof LineTo) { |
| 772 | this.lineTo(dest); |
| 773 | this.last().attributes.putAll(node.attributes.duplicate()); |
| 774 | return this; |
| 775 | } else if (node instanceof CubicTo) { |
| 776 | this.cubicTo(((CubicTo) node).c2, ((CubicTo) node).c1, dest); |
| 777 | this.last().attributes.putAll(node.attributes.duplicate()); |
| 778 | return this; |
| 779 | } |
| 780 | throw new Error(); |
| 781 | } |
| 782 | |
| 783 | /** |
| 784 | * "smoothly" builds a cubic segment to this point. This will rewrite the previous node to have the correct tangent. |
| 785 | * |
| 786 | * @param v |
| 787 | */ |
| 788 | public FLine smoothTo(Vec2 v) { |
| 789 | return smoothTo(v.toVec3()); |
| 790 | } |
| 791 |