<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Extracting vector from SWFs, writing and now drawing with them</title>
	<atom:link href="http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/feed/" rel="self" type="application/rss+xml" />
	<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/</link>
	<description></description>
	<pubDate>Fri, 30 Jul 2010 16:56:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: speedGuy</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-4935</link>
		<dc:creator>speedGuy</dc:creator>
		<pubDate>Fri, 12 Mar 2010 00:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-4935</guid>
		<description>Have you considered updating this library for Flash 10?

Doing the actual VectorText.write() takes about as much time as the flash player takes to do the actual rendering.

I'm guessing that if you used the Flash 10 GraphicsPath object for storing the ShapeRecord, instead of the list of Edge classes, it will be much more efficient to transform it during write().

This is because the ShapeRecord has only two vectors -- the command and data.  The command has the drawTo, curveTo, and moveTo information.  This never gets transformed.  The data contains a continuous list of x,y co-ordinates, in a Vector..  It is an easy job to iterate over the whole data vector with a scale and offset (and rotation if need be).

Doing this would also greatly reduce the number of objects within the ShapeRecord.  The Arial ASCII glyphs that I checked did not use any Fill objects.  Therefore the ShapeRecord could consist of only two fields -- the bounds, and GraphicsPath for most cases.  Only in strange cases would there be an interleaved array of FillStyle and GraphicsPath.

What do you think?</description>
		<content:encoded><![CDATA[<p>Have you considered updating this library for Flash 10?</p>
<p>Doing the actual VectorText.write() takes about as much time as the flash player takes to do the actual rendering.</p>
<p>I&#8217;m guessing that if you used the Flash 10 GraphicsPath object for storing the ShapeRecord, instead of the list of Edge classes, it will be much more efficient to transform it during write().</p>
<p>This is because the ShapeRecord has only two vectors &#8212; the command and data.  The command has the drawTo, curveTo, and moveTo information.  This never gets transformed.  The data contains a continuous list of x,y co-ordinates, in a Vector..  It is an easy job to iterate over the whole data vector with a scale and offset (and rotation if need be).</p>
<p>Doing this would also greatly reduce the number of objects within the ShapeRecord.  The Arial ASCII glyphs that I checked did not use any Fill objects.  Therefore the ShapeRecord could consist of only two fields &#8212; the bounds, and GraphicsPath for most cases.  Only in strange cases would there be an interleaved array of FillStyle and GraphicsPath.</p>
<p>What do you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-681</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 08 Feb 2010 10:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-681</guid>
		<description>Leonardo,

Drawing lines has to be done on a separate pass. I decided not to implement it because it was too slow.

Basically you need to create a new array of points (during parsing) and push only those that contain stroke information. Then sort the array to make sure they are in the right order.</description>
		<content:encoded><![CDATA[<p>Leonardo,</p>
<p>Drawing lines has to be done on a separate pass. I decided not to implement it because it was too slow.</p>
<p>Basically you need to create a new array of points (during parsing) and push only those that contain stroke information. Then sort the array to make sure they are in the right order.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leonardo</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-666</link>
		<dc:creator>leonardo</dc:creator>
		<pubDate>Thu, 04 Feb 2010 01:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-666</guid>
		<description>This is an excellent work! Congratulations!

I was wondering if you could help me with one thing: I see the library does not yet handle line shapes - I got it working all right with filled shapes, but it just seems to be ignoring line drawings.

I've been fiddling around with the code and downloaded the swf specification from Adobe, but it would be great if you could point me in the right direction to get it working for shapes with no fills as well.

I guess it shouldn't be too difficult, since the drawing commands should be the same in both cases, but now the ShapeRecord for that sort of library items seems to be empty.

Thanks a lot.</description>
		<content:encoded><![CDATA[<p>This is an excellent work! Congratulations!</p>
<p>I was wondering if you could help me with one thing: I see the library does not yet handle line shapes - I got it working all right with filled shapes, but it just seems to be ignoring line drawings.</p>
<p>I&#8217;ve been fiddling around with the code and downloaded the swf specification from Adobe, but it would be great if you could point me in the right direction to get it working for shapes with no fills as well.</p>
<p>I guess it shouldn&#8217;t be too difficult, since the drawing commands should be the same in both cases, but now the ShapeRecord for that sort of library items seems to be empty.</p>
<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-491</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 01 Dec 2009 20:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-491</guid>
		<description>Phil,

I made the change to the code. thanks</description>
		<content:encoded><![CDATA[<p>Phil,</p>
<p>I made the change to the code. thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-486</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Sat, 28 Nov 2009 14:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-486</guid>
		<description>I was playing around with this code and works nicely, but did come across a bug.

In ShapeRecord.as line 83 should be this

			_hasStateNewStyle = _tagType == TagTypes.DEFINE_SHAPE2
						&#124;&#124; _tagType == TagTypes.DEFINE_SHAPE3
						&#124;&#124; _tagType == TagTypes.DEFINE_SHAPE4;

I had a couple of objects which were Shape4 Type and were not showing up correctly. This fixed sorted it.

But nice code.</description>
		<content:encoded><![CDATA[<p>I was playing around with this code and works nicely, but did come across a bug.</p>
<p>In ShapeRecord.as line 83 should be this</p>
<p>			_hasStateNewStyle = _tagType == TagTypes.DEFINE_SHAPE2<br />
						|| _tagType == TagTypes.DEFINE_SHAPE3<br />
						|| _tagType == TagTypes.DEFINE_SHAPE4;</p>
<p>I had a couple of objects which were Shape4 Type and were not showing up correctly. This fixed sorted it.</p>
<p>But nice code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-466</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 11 Nov 2009 14:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-466</guid>
		<description>Rasmus,

you need an svn client to download the source code. you can find the repository url in the "Source" tab.</description>
		<content:encoded><![CDATA[<p>Rasmus,</p>
<p>you need an svn client to download the source code. you can find the repository url in the &#8220;Source&#8221; tab.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rasmus</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-465</link>
		<dc:creator>Rasmus</dc:creator>
		<pubDate>Wed, 11 Nov 2009 14:32:21 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-465</guid>
		<description>Hey,

On the googlecode site it is appearently not possible to get the source code or download the project. Is this an error or did you not get around to uploading it yet?</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>On the googlecode site it is appearently not possible to get the source code or download the project. Is this an error or did you not get around to uploading it yet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kwan</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-162</link>
		<dc:creator>Kwan</dc:creator>
		<pubDate>Wed, 19 Aug 2009 08:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-162</guid>
		<description>If its possible to read the fonts in flash.text.Font; I think it will be more flexible if it can read the fonts by Font.enumerateFonts()[i]</description>
		<content:encoded><![CDATA[<p>If its possible to read the fonts in flash.text.Font; I think it will be more flexible if it can read the fonts by Font.enumerateFonts()[i]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gilles</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-108</link>
		<dc:creator>Gilles</dc:creator>
		<pubDate>Sat, 25 Jul 2009 12:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-108</guid>
		<description>That's what I figured after posting my question and messing with the classes ^_^

thank you!
G.</description>
		<content:encoded><![CDATA[<p>That&#8217;s what I figured after posting my question and messing with the classes ^_^</p>
<p>thank you!<br />
G.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://wu-media.com/2009/05/extracting-vector-from-swfs-writing-and-now-drawing-with-them/comment-page-1/#comment-107</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 24 Jul 2009 14:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://wu-media.com/?p=84#comment-107</guid>
		<description>VectorText.getFontDefinition("FONT NAME").advances

will return an object containing the "widths" of characters. (it's actually more than the width, it's the width + padding before the next character.

for example

var charWidth:Number = VectorText.getFontDefinition("Arial").advances["A"];

will get the the width for the character "A"</description>
		<content:encoded><![CDATA[<p>VectorText.getFontDefinition(&#8221;FONT NAME&#8221;).advances</p>
<p>will return an object containing the &#8220;widths&#8221; of characters. (it&#8217;s actually more than the width, it&#8217;s the width + padding before the next character.</p>
<p>for example</p>
<p>var charWidth:Number = VectorText.getFontDefinition(&#8221;Arial&#8221;).advances["A"];</p>
<p>will get the the width for the character &#8220;A&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
