Add support for Quadratic Beziers
Affects  Status  Importance  Assigned to  Milestone  

 Inkscape 
Wishlist

Unassigned 
Bug Description
Inkscape currently supports Cubic Beziers. Quadratic Bezier curves are also an integral part of the SVG specification. It would be simply great if Inkscape would help us edit quadratic Beziers.
I am told that currently Inkscape can read quadratic Beziers from SVG files but it elevates them to cubic. It seems that this is a lossy conversion in the sense that the quadratic nature of that curve is not and one is allowed to edit the two generated control points mutually independently, and hence while saving back, (whether the generated control points were modified or not) the original quadratic nature is lost and the curve is henceforth a cubic.
I feel it is important that Inkscape should provide native support for quadratic Beziers. Rendering it on screen for editing purposes would not be a problem, since even if you only do cubic rendering using Cairo or such, you can always temporarily elevate the quadratic to cubic for rendering purposes. But there should be a quadratic mode for the Bezier drawing tool, which would only allow for specifying one control point per curve segment.
I realize that there has been a recent discussion of this on the devel list: http://
But it seems (http://
But obviously it is not necessary to wait for the elliptic question to be resolved for the quadratic feature to be provided. Quadratic editing capabilities would be a great boon for users with specific requirements like me! I hope this link: http://
tags:  added: nodeediting svg 
Changed in inkscape:  
importance:  Undecided → Wishlist 
status:  New → Confirmed 
Shriramana Sharma (jamadagni) wrote :  #1 
Shriramana Sharma (jamadagni) wrote :  #2 
So I did some more digging:
1. Apparently a quadratic can't be substituted by a cubic where both cubic controls are set equal to the single quadratic one, or one cubic control is set equal to a node and the other is set equal to the quadratic control. Only the 2/3 formula will work. See attached images. (http://
2. FWIW I submitted some simple patches for Cairo to support quadratics: http://
Hello. I've been investigating this and it seems that one should not simply join the cubic's control points together. Since Cairo (IIRC Inkscape from the current development onwards uses Cairo) does not have a builtin function to draw quadratic curves (http://www.cairographics.org/manual/cairoPaths.html ) the behindthescenes cubic control point pair equivalent to a single quadratic control point have to be calculated by degreeelevation.
The generic formula is available at http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Degree_elevation but the relevant version for the present situation is given by: http://caffeineowl.com/graphics/2d/vectorial/cubic2quad01.html
<quote>
A quadratic Bezier can be always represented by a cubic one by applying the degree elevation algorithm. The resulted cubic representation will share its anchor points with the original quadratic, while the control points will be at 2/3 of the quadratic handle segments:
C1 = (2·C + P1)/3
C2 = (2·C + P2)/3
</quote>