[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] reading shape data from an existing swf file in py
From: |
Matthias Kramm |
Subject: |
Re: [Swftools-common] reading shape data from an existing swf file in pyswf |
Date: |
Fri, 12 Aug 2005 21:19:24 +0200 |
User-agent: |
Mutt/1.5.6i |
On Wed, Aug 10, 2005 at 11:49:48PM +0530, Chetan Taralekar wrote:
> I was wondering if there's any way I could read the primitives(moveto,
> lineto, splineto, ..) from an existing swf file? I just read a post
> about how to create shapes in pyswf, and realised that there might be a
> way to query that same data from an existing swf, but I couldnt seem to
> find any usage info..
Yes, that's possible- you can use "swfdump -s" to write out
the polygon paths.
E.g.:
swfdump -s test.swf
| ...
| fill: 01/00 line:00 - moveTo 0.00 0.00
| fill: 01/00 line:00 - lineTo 466.00 0.00
| fill: 01/00 line:00 - lineTo 466.00 266.00
| fill: 01/00 line:00 - lineTo 0.00 266.00
| fill: 01/00 line:00 - lineTo 0.00 0.00
| ...
So what you have to pass to swfc is
moveTo 0.00 0.00
lineTo 466.00 0.00
lineTo 466.00 266.00
lineTo 0.00 266.00
lineTo 0.00 0.00
.
Greetings
Matthias