[Top][All Lists]

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

Re: [Swftools-common] pdf2swf overlapping polygon

From: Matthias Kramm
Subject: Re: [Swftools-common] pdf2swf overlapping polygon
Date: Wed, 4 Feb 2009 17:48:31 +0100
User-agent: Mutt/1.5.6i

On Wed, Feb 04, 2009 at 01:27:50PM +0200, Jarno Kyttälä <address@hidden> wrote:
> SWF converted with pdf2swf:
> http://jakki.org/pdf/overlap.swf
> Original PDF:
> http://jakki.org/pdf/overlap.pdf
> I know that this behavior is expected when you draw a shape with 
> built-in Flash drawing functions (beginFill, lineTo etc..). However this 
> doesn't seem to apply to PDFs.

PDF supports two different fill modes: odd-even fill and
clockwise/anticlockwise. What you have here is a polygon filled
with clockwise fill (i.e., only *anticlockwise* loops create a hole
in a filled polygon). This is a fill mode which is pretty rare,
and not currently supported by pdf2swf.

> I guess pdf2swf just transcodes polygons from PDF to SWF, and this 
> matter isn't taken into account.

I actually had code in place once for converting polygons from
clockwise/anticlockwise to even/odd, but it was based on libart's
polygon intersector which was much too unstable.

> Is there a way (hidden command line parameter, or tweaking the source 
> code perhaps?) to get around the problem?

A crude (bitmap based) workaround is
    pdf2swf -s poly2bitmap file.pdf -o file.swf



reply via email to

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