<?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: Fast Line Drawing</title>
	<atom:link href="http://jacksondunstan.com/articles/506/feed" rel="self" type="application/rss+xml" />
	<link>http://jacksondunstan.com/articles/506</link>
	<description>Mastering AS3</description>
	<lastBuildDate>Mon, 14 May 2012 17:02:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Russ</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-12617</link>
		<dc:creator>Russ</dc:creator>
		<pubDate>Sun, 11 Sep 2011 15:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-12617</guid>
		<description>Anyone landing here looking for how to draw fast lines should definitely look into flash.display.Graphics.drawPath, which essentially bundles up a series of lineTo calls and avoid a lot of function overhead:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#drawPath()

Flash &gt;= 10 only, and watch out for transparency issues (if you care) as described very well here:
http://www.flashandmath.com/howtos/pathalpha/</description>
		<content:encoded><![CDATA[<p>Anyone landing here looking for how to draw fast lines should definitely look into flash.display.Graphics.drawPath, which essentially bundles up a series of lineTo calls and avoid a lot of function overhead:<br />
<a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#drawPath" rel="nofollow">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html#drawPath</a>()</p>
<p>Flash &gt;= 10 only, and watch out for transparency issues (if you care) as described very well here:<br />
<a href="http://www.flashandmath.com/howtos/pathalpha/" rel="nofollow">http://www.flashandmath.com/howtos/pathalpha/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert W</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-5722</link>
		<dc:creator>Robert W</dc:creator>
		<pubDate>Sat, 30 Apr 2011 02:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-5722</guid>
		<description>right. what a shame... ;( Anyway thanks for that. I just need the performance as well as the look. But the look might be number 1. So back to lineStyle i guess.. Thanks for your help.</description>
		<content:encoded><![CDATA[<p>right. what a shame&#8230; ;( Anyway thanks for that. I just need the performance as well as the look. But the look might be number 1. So back to lineStyle i guess.. Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-5710</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Fri, 29 Apr 2011 17:39:52 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-5710</guid>
		<description>Nope, &lt;code&gt;efla&lt;/code&gt; doesn&#039;t have those features so I tested it against a simple 1-pixel stroke.

Also, check out the &lt;a href=&quot;/articles/1079#article506&quot; rel=&quot;nofollow&quot;&gt;performance update&lt;/a&gt; in Flash Player 10.2.</description>
		<content:encoded><![CDATA[<p>Nope, <code>efla</code> doesn&#8217;t have those features so I tested it against a simple 1-pixel stroke.</p>
<p>Also, check out the <a href="/articles/1079#article506" rel="nofollow">performance update</a> in Flash Player 10.2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert W</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-5708</link>
		<dc:creator>Robert W</dc:creator>
		<pubDate>Fri, 29 Apr 2011 15:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-5708</guid>
		<description>Hi guys,
This is great stuff, but I&#039;ve been trying to look around for this EFLA line generator, is there anyway you can control the stroke or thickness of the line? Otherwise it&#039;s pretty much no wonder why its faster right? Because you can only control the color but not the style of it like lineStyle does? Please advice. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi guys,<br />
This is great stuff, but I&#8217;ve been trying to look around for this EFLA line generator, is there anyway you can control the stroke or thickness of the line? Otherwise it&#8217;s pretty much no wonder why its faster right? Because you can only control the color but not the style of it like lineStyle does? Please advice. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-4346</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Wed, 02 Mar 2011 07:29:12 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-4346</guid>
		<description>Cool! This will definitely revitalize &lt;code&gt;efla&lt;/code&gt; after the (somewhat) lost ground in Flash Player 10.2.</description>
		<content:encoded><![CDATA[<p>Cool! This will definitely revitalize <code>efla</code> after the (somewhat) lost ground in Flash Player 10.2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: skyboy</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-4345</link>
		<dc:creator>skyboy</dc:creator>
		<pubDate>Wed, 02 Mar 2011 07:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-4345</guid>
		<description>I decided to optimize this a bit, and the results I got were with my update being consisitantly 55% faster (145 ms vs 323 ms), thought I&#039;d share.
https://github.com/skyboy/AS3-Utilities/blob/master/skyboy/utils/efla.as</description>
		<content:encoded><![CDATA[<p>I decided to optimize this a bit, and the results I got were with my update being consisitantly 55% faster (145 ms vs 323 ms), thought I&#8217;d share.<br />
<a href="https://github.com/skyboy/AS3-Utilities/blob/master/skyboy/utils/efla.as" rel="nofollow">https://github.com/skyboy/AS3-Utilities/blob/master/skyboy/utils/efla.as</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-777</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Fri, 13 Aug 2010 05:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-777</guid>
		<description>It&#039;s not my line-drawing algorithm, but what would I copy/draw from?</description>
		<content:encoded><![CDATA[<p>It&#8217;s not my line-drawing algorithm, but what would I copy/draw from?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: limeyd</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-776</link>
		<dc:creator>limeyd</dc:creator>
		<pubDate>Fri, 13 Aug 2010 03:02:10 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-776</guid>
		<description>Awesome tip, why not swap out the setPixels for copypixels or draw, not as good as photoshop but still rocking</description>
		<content:encoded><![CDATA[<p>Awesome tip, why not swap out the setPixels for copypixels or draw, not as good as photoshop but still rocking</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-567</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Sat, 13 Mar 2010 02:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-567</guid>
		<description>On a 2.0 Ghz Intel Core 2 Duo, 2 GB RAM, Mac OS X 10.6:

&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;Dest Point&lt;/th&gt;
&lt;th&gt;efla&lt;/th&gt;
&lt;th&gt;lineTo (low)&lt;/th&gt;
&lt;th&gt;lineTo (medium)&lt;/th&gt;
&lt;th&gt;lineTo (high)&lt;/th&gt;
&lt;th&gt;lineTo (best)&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;999,999&lt;/td&gt;
&lt;td&gt;99&lt;/td&gt;
&lt;td&gt;1 vector/97 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/407 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/2095 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/4703 bitmap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100,100&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;1 vector/14 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/50 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/216 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/481 bitmap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10,10&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1 vector/6 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/14 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/38 bitmap&lt;/td&gt;
&lt;td&gt;1 vector/71 bitmap&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

So yes, it does seem as though there is a fair amount of overhead. It seems safe to say that if you want to draw a lot of little lines and can live with the reduced feature set (eg. solid colors), you&#039;ll get a very large (6x minimum) speedup by using a &lt;tt&gt;BitmapData&lt;/tt&gt;-based algorithm.

Thanks for the tip!</description>
		<content:encoded><![CDATA[<p>On a 2.0 Ghz Intel Core 2 Duo, 2 GB RAM, Mac OS X 10.6:</p>
<table>
<tr>
<th>Dest Point</th>
<th>efla</th>
<th>lineTo (low)</th>
<th>lineTo (medium)</th>
<th>lineTo (high)</th>
<th>lineTo (best)</th>
</tr>
<tr>
<td>999,999</td>
<td>99</td>
<td>1 vector/97 bitmap</td>
<td>1 vector/407 bitmap</td>
<td>1 vector/2095 bitmap</td>
<td>1 vector/4703 bitmap</td>
</tr>
<tr>
<td>100,100</td>
<td>10</td>
<td>1 vector/14 bitmap</td>
<td>1 vector/50 bitmap</td>
<td>1 vector/216 bitmap</td>
<td>1 vector/481 bitmap</td>
</tr>
<tr>
<td>10,10</td>
<td>1</td>
<td>1 vector/6 bitmap</td>
<td>1 vector/14 bitmap</td>
<td>1 vector/38 bitmap</td>
<td>1 vector/71 bitmap</td>
</tr>
</table>
<p>So yes, it does seem as though there is a fair amount of overhead. It seems safe to say that if you want to draw a lot of little lines and can live with the reduced feature set (eg. solid colors), you&#8217;ll get a very large (6x minimum) speedup by using a <tt>BitmapData</tt>-based algorithm.</p>
<p>Thanks for the tip!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: benji</title>
		<link>http://jacksondunstan.com/articles/506/comment-page-1#comment-566</link>
		<dc:creator>benji</dc:creator>
		<pubDate>Fri, 12 Mar 2010 12:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=506#comment-566</guid>
		<description>not sure if its relevant, but if i remember rightly the graphics methods are not affected much by the distance of the line drawn..where as any bitmap method would gain a performance boost for shorter differences..

do a find and replace for &quot;999&quot; and change it to &quot;100&quot;

you should here really see the benifits ;)</description>
		<content:encoded><![CDATA[<p>not sure if its relevant, but if i remember rightly the graphics methods are not affected much by the distance of the line drawn..where as any bitmap method would gain a performance boost for shorter differences..</p>
<p>do a find and replace for &#8220;999&#8243; and change it to &#8220;100&#8243;</p>
<p>you should here really see the benifits ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

