<?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"
	>

<channel>
	<title>CanvasPaint blog</title>
	<atom:link href="http://canvaspaint.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://canvaspaint.org/blog</link>
	<description></description>
	<pubDate>Mon, 04 Aug 2008 19:04:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>test post</title>
		<link>http://canvaspaint.org/blog/2008/08/test-post/</link>
		<comments>http://canvaspaint.org/blog/2008/08/test-post/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 19:04:11 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/?p=23</guid>
		<description><![CDATA[narf
]]></description>
			<content:encoded><![CDATA[<p>narf</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2008/08/test-post/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Code released into public domain</title>
		<link>http://canvaspaint.org/blog/2008/02/code-released-into-public-domain/</link>
		<comments>http://canvaspaint.org/blog/2008/02/code-released-into-public-domain/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 17:39:35 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2008/02/code-released-into-public-domain/</guid>
		<description><![CDATA[Since I have moved on to other projects, I hereby release the JavaScript code (http://canvaspaint.org/paint.js) into the wild: If this code, messy as it is, is of any use to you, feel free to take it.
This expressly does not include images, cursors or any other intellectual property, the rights to which I do not own [...]]]></description>
			<content:encoded><![CDATA[<p>Since I have moved on to <a href="http://www.soup.io">other projects</a>, I hereby release the JavaScript code (<a href="http://canvaspaint.org/paint.js">http://canvaspaint.org/paint.js</a>) into the wild: If this code, messy as it is, is of any use to you, feel free to take it.</p>
<p>This expressly does not include images, cursors or any other intellectual property, the rights to which I do not own myself.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/publicdomain/"><br />
<img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/publicdomain/88x31.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2008/02/code-released-into-public-domain/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Firefox 3 to support drawing text</title>
		<link>http://canvaspaint.org/blog/2007/09/firefox-3-to-support-drawing-text/</link>
		<comments>http://canvaspaint.org/blog/2007/09/firefox-3-to-support-drawing-text/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 19:31:48 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2007/09/firefox-3-to-support-drawing-text/</guid>
		<description><![CDATA[Firefox 3 will provide these unstandardized, experimental methods:
mozDrawText();
mozMeasureText();
mozPathText();
mozTextAlongPath();
]]></description>
			<content:encoded><![CDATA[<p>Firefox 3 will provide <a href="http://developer.mozilla.org/en/docs/Canvas:Text">these unstandardized, experimental methods</a>:<br />
mozDrawText();<br />
mozMeasureText();<br />
mozPathText();<br />
mozTextAlongPath();</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2007/09/firefox-3-to-support-drawing-text/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CanvasPaint on the Wii</title>
		<link>http://canvaspaint.org/blog/2007/04/wii/</link>
		<comments>http://canvaspaint.org/blog/2007/04/wii/#comments</comments>
		<pubDate>Wed, 11 Apr 2007 12:39:21 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[drawings]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2007/04/wii/</guid>
		<description><![CDATA[On April 1st, user YOSHI1999 over at the Nintendo forums posted a bunch of exclusive, totally non-fake screenshots from the upcoming Wii game &#8220;Super Smash Bros&#8221;.
What&#8217;s especially notable: These were all drawn inside the Wii&#8217;s Internet Channel (aka Opera), with the Wiimote. Amazing!
]]></description>
			<content:encoded><![CDATA[<p>On April 1st, user YOSHI1999 over at the Nintendo forums posted a bunch of <a href="http://forums.nintendo.com/nintendo/board/message?board.id=smash&#038;message.id=1316794&#038;view=by_date_ascending&#038;page=1">exclusive, totally non-fake screenshots</a> from the upcoming Wii game &#8220;Super Smash Bros&#8221;.</p>
<p>What&#8217;s especially notable: These were all drawn inside the <strong>Wii&#8217;s Internet Channel</strong> (aka Opera), with the Wiimote. Amazing!</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2007/04/wii/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Celebrity mentions</title>
		<link>http://canvaspaint.org/blog/2007/03/celebrity-mentions/</link>
		<comments>http://canvaspaint.org/blog/2007/03/celebrity-mentions/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 05:23:54 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[reactions]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2007/03/celebrity-mentions/</guid>
		<description><![CDATA[CanvasPaint was mentioned on Coding Horror the other day, in a quote of a Bruce Eckel article. Only he removed the link when he quoted that part. Boo hoo.
&#8220;&#8230;Someone did an imitation of the much simpler Microsoft Paint using HTML, CSS and JavaScript. Very impressive, but you get the sense that this is close to [...]]]></description>
			<content:encoded><![CDATA[<p>CanvasPaint was mentioned on <a href="http://www.codinghorror.com/blog/archives/000815.html">Coding Horror</a> the other day, in a quote of a <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=193593">Bruce Eckel</a> article. Only he removed the link when he quoted that part. Boo hoo.</p>
<blockquote><p>&#8220;&#8230;Someone did an imitation of the much simpler Microsoft Paint using HTML, CSS and JavaScript. Very impressive, but you get the sense that this is close to the limit of what those technologies can do&#8221;</p></blockquote>
<p>&mdash;Bruce Eckel</p>
<p>PS: This blog&#8217;s not dead. &#8220;It&#8217;s just resting!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2007/03/celebrity-mentions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Saving canvas images with PHP</title>
		<link>http://canvaspaint.org/blog/2007/01/saving-images/</link>
		<comments>http://canvaspaint.org/blog/2007/01/saving-images/#comments</comments>
		<pubDate>Thu, 04 Jan 2007 12:36:15 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2007/01/saving-images/</guid>
		<description><![CDATA[I&#8217;ve been asked for the source of save.php, which handles saving an image to the server.
In JavaScript, the data url of the canvas is posted to save.php over AJAX. (As an aside, this is the single usage of Ajax in CanvasPaint, so it really doesn&#8217;t deserve to be that prominent of a tag for the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://canvaspaint.org/d83.png">I&#8217;ve been asked</a> for the source of save.php, which handles saving an image to the server.</p>
<p>In JavaScript, the <a href="http://en.wikipedia.org/wiki/Data:_URI_scheme">data url</a> of the canvas is posted to save.php over AJAX. (As an aside, this is the single usage of Ajax in CanvasPaint, so it really doesn&#8217;t deserve to be that prominent of a tag for the site on <a href="http://del.icio.us/url/2a4906dacc2bc4849dc1b87e9fc1392d?settagview=list">del.icio.us</a>&#8230;)</p>
<pre>req.open("POST", "save.php", true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
req.send("u="+canvas.toDataURL());</pre>
<p>In PHP, <a href="http://php.net/base64_decode">base64_decode()</a> does all the magic:</p>
<p><code style="font-style:normal">$dataurl = str_replace(" ", "+", $_POST["u"]);<br />
$data = substr($dataurl, strpos($dataurl, &#8220;,&#8221;));</code></p>
<p><code style="font-style:normal">$file = f<strong></strong>open(&#8221;image.png&#8221;, &#8220;wb&#8221;);<br />
f<strong></strong>write($file, base64_decode($data));<br />
fclose($file);<br />
</code></p>
<p>Add a couple of security checks (mimetype, data url length, evil hax0ring attempts&#8230;) and filename generation, and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2007/01/saving-images/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Highlights #3</title>
		<link>http://canvaspaint.org/blog/2006/12/highlights3/</link>
		<comments>http://canvaspaint.org/blog/2006/12/highlights3/#comments</comments>
		<pubDate>Sat, 30 Dec 2006 04:33:36 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[drawings]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2006/12/highlights3/</guid>
		<description><![CDATA[In the absence of real updates (which can currently be blamed on this), let&#8217;s see some more drawings:
           
See you in 2007.
]]></description>
			<content:encoded><![CDATA[<p>In the absence of real updates (which can currently be blamed on <a href="https://events.congress.ccc.de/congress/2006/Home">this</a>), let&#8217;s see some more drawings:</p>
<p><a href="http://canvaspaint.org/6e52.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.6e52.png" /></a> <a href="http://canvaspaint.org/272.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.272.png" /></a> <a href="http://canvaspaint.org/6e7f.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.6e7f.png" /></a> <a href="http://canvaspaint.org/98ca.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.98ca.png" /></a> <a href="http://canvaspaint.org/91dc.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.91dc.png" /></a> <a href="http://canvaspaint.org/d22.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.d22.png" /></a> <a href="http://canvaspaint.org/2ca5.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.2ca5.png" /></a> <a href="http://canvaspaint.org/7006.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.7006.png" /></a> <a href="http://canvaspaint.org/faa.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.faa.png" /></a> <a href="http://canvaspaint.org/621.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.621.png" /></a> <a href="http://canvaspaint.org/dff.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.dff.png" /></a> <a href="http://canvaspaint.org/3c08.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.3c08.png" /></a></p>
<p>See you in 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2006/12/highlights3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Drawing an ellipse on &#60;canvas&#62;</title>
		<link>http://canvaspaint.org/blog/2006/12/ellipse/</link>
		<comments>http://canvaspaint.org/blog/2006/12/ellipse/#comments</comments>
		<pubDate>Thu, 28 Dec 2006 13:59:04 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2006/12/ellipse/</guid>
		<description><![CDATA[This is just simple mathematics/geometry, but I remember googling for this for hours back when I first implemented the ellipse tool. Courtesy of Gavin Doughtie and Jon Stewart&#8217;s excellent presentation No Flash Required: Interactive Browser Graphics, this is how to draw an ellipse with bezier curves where x1/x2–y1/y2 is its bounding box.
var KAPPA = 4 [...]]]></description>
			<content:encoded><![CDATA[<p>This is just simple mathematics/geometry, but I remember googling for this for hours back when I first implemented the ellipse tool. Courtesy of Gavin Doughtie and Jon Stewart&#8217;s excellent presentation <a href="http://www.xdraw.org/oscon_slides/">No Flash Required: Interactive Browser Graphics</a>, this is how to draw an ellipse with bezier curves where x1/x2–y1/y2 is its bounding box.</p>
<pre>var KAPPA = 4 * ((Math.sqrt(2) -1) / 3);

var rx = (x2-x1)/2;
var ry = (y2-y1)/2;

var cx = x1+rx;
var cy = y1+ry;

trg.beginPath();
trg.moveTo(cx, cy - ry);
trg.bezierCurveTo(cx + (KAPPA * rx), cy - ry,  cx + rx, cy - (KAPPA * ry), cx + rx, cy);
trg.bezierCurveTo(cx + rx, cy + (KAPPA * ry), cx + (KAPPA * rx), cy + ry, cx, cy + ry);
trg.bezierCurveTo(cx - (KAPPA * rx), cy + ry, cx - rx, cy + (KAPPA * ry), cx - rx, cy);
trg.bezierCurveTo(cx - rx, cy - (KAPPA * ry), cx - (KAPPA * rx), cy - ry, cx, cy - ry);</pre>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2006/12/ellipse/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Highlights #2</title>
		<link>http://canvaspaint.org/blog/2006/12/highlights2/</link>
		<comments>http://canvaspaint.org/blog/2006/12/highlights2/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 21:22:21 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[drawings]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2006/12/highlights2/</guid>
		<description><![CDATA[           
]]></description>
			<content:encoded><![CDATA[<p><a href="http://canvaspaint.org/1a5a.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.1a5a.png" /></a> <a href="http://canvaspaint.org/38d6.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.38d6.png" /></a> <a href="http://canvaspaint.org/f3b3.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.f3b3.png" /></a> <a href="http://canvaspaint.org/87e4.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.87e4.png" /></a> <a href="http://canvaspaint.org/22d7.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.22d7.png" /></a> <a href="http://canvaspaint.org/705.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.705.png" /></a> <a href="http://canvaspaint.org/2fb5.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.2fb5.png" /></a> <a href="http://canvaspaint.org/573.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.573.png" /></a> <a href="http://canvaspaint.org/cf31.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.cf31.png" /></a> <a href="http://canvaspaint.org/4a0.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.4a0.png" /></a> <a href="http://canvaspaint.org/82c4.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.82c4.png" /></a> <a href="http://canvaspaint.org/852.png" rel="lightbox"><img src="http://canvaspaint.org/_thumb.852.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2006/12/highlights2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New feature: Flood fill</title>
		<link>http://canvaspaint.org/blog/2006/12/flood-fill/</link>
		<comments>http://canvaspaint.org/blog/2006/12/flood-fill/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 01:42:21 +0000</pubDate>
		<dc:creator>c3o</dc:creator>
		
		<category><![CDATA[features]]></category>

		<guid isPermaLink="false">http://canvaspaint.org/blog/2006/12/flood-fill/</guid>
		<description><![CDATA[This is only available in Opera 9 for now, and it&#8217;s pretty damn slow. Performance on Firefox 3/Gran Paradiso was even worse by a couple of magnitudes, so I haven&#8217;t enabled it there yet — I guess I&#8217;ll be benchmarking some different flood fill algorithms later this week.
]]></description>
			<content:encoded><![CDATA[<p>This is only available in Opera 9 for now, and it&#8217;s pretty damn slow. Performance on Firefox 3/Gran Paradiso was even worse by a couple of magnitudes, so I haven&#8217;t enabled it there yet — I guess I&#8217;ll be benchmarking some different <a href="http://student.kuleuven.be/~m0216922/CG/floodfill.html">flood fill algorithms</a> later this week.</p>
]]></content:encoded>
			<wfw:commentRss>http://canvaspaint.org/blog/2006/12/flood-fill/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.884 seconds -->
