I don't mind what language or platform - I'm just failing to understand how this part of the SVG spec is meant to be used. For example the code below generates the image

which in no way is smooth or even a curve.
Code: Select all
$image = new Imagick();
$image->newImage(800, 500, 'none', 'png');
$bezier1 = new ImagickDraw();
$bezier1->setFillColor('#B42AAF');
$bezier1->setStrokeColor('black');
$bezier1->setStrokeWidth(1);
$bezier1->pathStart();
$bezier1->pathMoveToAbsolute(50, 200);
// This specifies a bezier curve with the current position as the start
// point, two control points, and an end point.
$bezier1->pathCurveToAbsolute(
50, 140,
250, 140,
250, 200
);
// This specifies a bezier curve with the current position as the start
// point, the first control point is a 'mirrored' from the previous bezier
// curve, and the value here specify the second control point and the end point.
$bezier1->pathCurveToSmoothAbsolute(
450, 260,
450, 200
);
//apparently draws a straight line
$bezier1->pathCurveToQuadraticBezierSmoothAbsolute(
650,
230
);
$bezier1->pathFinish();
$image->drawImage($bezier1);
header('Content-Type: image/png');
echo $image;