<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael Welford&#187; programming Archives  &#8211; Michael Welford . com</title>
	<atom:link href="http://www.michaelwelford.com/blog/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michaelwelford.com</link>
	<description>Subjective meets the objective</description>
	<lastBuildDate>Tue, 03 Mar 2009 11:16:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Advanced Flash Line Drawing: Intro</title>
		<link>http://www.michaelwelford.com/blog/advanced-flash-line-drawing-intro/</link>
		<comments>http://www.michaelwelford.com/blog/advanced-flash-line-drawing-intro/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 11:11:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Generative Art]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.michaelwelford.com/?p=270</guid>
		<description><![CDATA[One of the most basic and fundamental things to draw with code is a line - in terms of importance it is right up there with the pixel.
Line drawing in Flash is, on the whole, pretty darned fantastic. You get curves, lines, varying stroke widths and colours etc. all nicely anti-aliased with just a few [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most basic and fundamental things to draw with code is a line - in terms of importance it is right up there with the pixel.</p>
<p>Line drawing in Flash is, on the whole, pretty darned fantastic. You get curves, lines, varying stroke widths and colours etc. all nicely anti-aliased with just a few commands thrown at the API. However, when it comes to pure quality and flexibility it has quite a few short comings, which is especially a problem when it comes to drawing interesting, varied, <em>magical</em> lines.</p>
<p>Here&#8217;s a few (to get the ball rolling) limitations with line drawing in the Flash drawing API.</p>
<h5>1. Fractional stroke widths aren&#8217;t supported</h5>
<p>Want a stroke width 0.234 points / pixels wide? Bad luck champ!</p>
<h5>2. Anti-aliasing could be better</h5>
<p>I have no references (anyone?) to the type of anti-aliasing that Flash does, perhaps as a guess it looks like some kind of an A-Buffer or just a basic super sampling algorithm, but whatever it is it could be a whole lot smoother.</p>
<h5>3. Dotted lines aren&#8217;t supported in code</h5>
<p>Easy to hack for straight lines but quite a bit harder for curved lines</p>
<h5>4. Gradients on lines don&#8217;t follow curves</h5>
<h5>5. You can&#8217;t change stroke widths, colours, alpha etc. values smoothly along the length of a line</h5>
<h5>6. Brush strokes, texturing, sampling etc. aren&#8217;t supported</h5>
<h5>7. Line &#8220;edges&#8221; are always perfect and parallel</h5>
<p>Thankfully all of this can be worked around with code (ahh, beautiful, powerful code) which I am going to go through in series to build up some really powerful line drawing code that a lot of nice effects can be achieved with.</p>
<p>If there are any things that you want covered or have seen done (journal article references are also good!) please let me know so that I can have a go at incorporating into this series.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michaelwelford.com/blog/advanced-flash-line-drawing-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
