swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] swfc: Importing SVG elliptical arcs


From: Matthias Kramm
Subject: Re: [Swftools-common] swfc: Importing SVG elliptical arcs
Date: Mon, 26 Nov 2007 08:32:08 +0100
User-agent: Mutt/1.5.6i

On Sun, Nov 25, 2007 at 06:08:10PM +0200, Vladimir Dzhuvinov wrote:
> Basically, in Inkscape I noticed that when I drew a smaller object (e.g.
> rectangle) within the ellipse/circle and did a union of the two - the
> resulting object - which should obviously have the unmodified outline of
> the outer ellipse/circle, was no longer described with "arc" commands,
> but instead with 4 usual "C" (bezier)commands which swfc understands well.

Interesting. Probably Inkscape does the "union" operation on splines (or
even lines), and hence before applying the union converts all Arcs to
Beziers.

> The first thing that came to my mind was to approximate the arcs with
> bezier curves that you have already programmed into swftools.

That's not needed- swftools already has a way to draw Arcs. The
routine is called "conicTo". It approximates an arc using a 3rd-order
bezier. (which is then internally converted back to a number of 2nd-order
beziers at some point)
It only works reliably for arcs smaller than 90°, though, which is
consistent with your finding:

> Tellingly, I also found a message
> [http://uncommonplace.com/blog/?p=254#comment-1453] saying that Inkscape
> was in fact using this approximation method to draw elliptical arcs by
> using a bezier for every 90 deg.

So I guess the SVG code would need to call that routine four times.

Greetings

Matthias






reply via email to

[Prev in Thread] Current Thread [Next in Thread]