arcTo > rounded corners

var arcto = new bs.Path([ 'M', rectX, ',', rectY, 'L', rectX + rectWidth - r, ',', lineTo.y ].join(' '));
arcto.canvasArcTo(rectX + rectWidth/*125*/, rectY/*50*/, rectX + rectWidth/*125*/, rectY + r/*75*/, r/*25*/);
arcto.lineTo(rectX + rectWidth, rectY + rectHeight);
arcto.attributes({stroke:'yellow', 'stroke-width':5});
stage.addChild(arcto);
stage.beginPath();
stage.moveTo(rectX, rectY);
stage.lineTo(rectX + rectWidth - r /*100*/, lineTo.y/*50*/);
stage.arcTo(rectX + rectWidth/*125*/, rectY/*50*/, rectX + rectWidth/*125*/, rectY + r/*75*/, r/*25*/);
stage.lineTo(rectX + rectWidth, rectY + rectHeight);
stage.strokeStyle = 'red';
stage.strokeWidth = 5;
stage.stroke();
stage.innerHTML = '<svg><path d="'+[ 'M',rectX,',',rectY, 'L',rectX+rectWidth-r,',',rectY, 'A',r,',',r,',',0,',',0,',',1,',',rectX+rectWidth,',',rectY+r, 'L',rectX + rectWidth, rectY + rectHeight ].join(' ')+'" style="stroke:red; stroke-width:5px;" /></svg>';
Raphael API:
EaselJs API:
PaperJs API: