W3C home > Mailing lists > Public > www-svg@w3.org > December 2008

Re: help on algorithms for rendering SVG graphic elements

From: <fred.wang@free.fr>
Date: Sat, 27 Dec 2008 21:35:35 +0100
Message-ID: <1230410135.495691974535a@imp.free.fr>
To: Manlio Perillo <manlio.perillo@gmail.com>
Cc: www-svg@w3.org

Hi,

Quadratic Bézier curves can easily be drawn using cubic Bézier curves, see
wikipedia:

http://en.wikipedia.org/wiki/Bezier_curves#Terminology

For elliptical arcs, here is the algorithm used by Firefox to approximate them:

http://www.spaceroots.org/documents/ellipse/elliptical-arc.pdf
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/src/gfxContext.cpp#803

HTH,

F. Wang

>
> Hi.
>
> I'm implementing a tool, where I plan to support the conversion of SVG
> documents in PDF.
> The tool is available here:
> http://hg.mperillo.ath.cx/pdfimg
>
> Development started with the need of import *big* PNG images in a PDF
> document, with *high* color fidelity.
>
> Recently I have added support for Type1 fonts, and now I'm implementing
> support for JPEG images, SVG documents and OpenType fonts (hopefully, in
> future, CSS, too).
>
> In PDF, there is only support for cubic Bezier curves.
> Where can I find algorithms for rendering all the SVG graphic elements
> (quadratic Bezier curves, elliptical arc curve, ellipse and circle)
> using cubic Bezier curves?
>
>
>
> Thanks   Manlio Perillo
>
>
>
>
Received on Saturday, 27 December 2008 20:36:09 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:41 GMT