<?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>jp.ferv.blog &#187; GraphicsPath</title>
	<atom:link href="http://ferv.jp/blog/tag/graphicspath/feed/" rel="self" type="application/rss+xml" />
	<link>http://ferv.jp/blog</link>
	<description>「ActionScriptは素晴らしい。コンパイルする価値がある。」って偉い人が言ってた。</description>
	<lastBuildDate>Sun, 15 Aug 2010 00:42:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ぐるぐるしたら、部屋が暖まる法則</title>
		<link>http://ferv.jp/blog/2009/11/03/colormatrixfilter/</link>
		<comments>http://ferv.jp/blog/2009/11/03/colormatrixfilter/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 18:38:02 +0000</pubDate>
		<dc:creator>dsk</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[ColorMatrixFilter]]></category>
		<category><![CDATA[GraphicsPath]]></category>

		<guid isPermaLink="false">http://ferv.jp/blog/?p=1042</guid>
		<description><![CDATA[Flower &#8211; wonderfl build flash online
GraphicsPathで描いた花びら何枚も重ねて、ColorMatrixFilterを使って色をぐるぐる・・・しようと思ったら、や [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;width:465px;"><iframe title="Flower - wonderfl build flash online" scrolling="no" src="http://wonderfl.net/blogparts/bdb527476b31a0c9caf3d9c43b0ea736a74e268d" width="465" height="490" style="border:none;"></iframe><a href="http://wonderfl.net/code/bdb527476b31a0c9caf3d9c43b0ea736a74e268d" title="Flower - wonderfl build flash online">Flower &#8211; wonderfl build flash online</a></div>
<p>GraphicsPathで描いた花びら何枚も重ねて、ColorMatrixFilterを使って色をぐるぐる・・・しようと思ったら、やっぱりShapeが何枚も重なってるとPCのファンが周りまくりんぐで部屋が暖まったから一枚のビットマップにして色をぐるぐるした。</p>
<p><img src="http://ferv.jp/blog/wp-content/uploads/2009/11/colormatrixfilter.png" alt="colormatrixfilter" title="colormatrixfilter" width="465" height="230" class="alignnone size-full wp-image-1046" /></p>
<p>上の図はColorMatrixFilterの行列の1行目、つまりRedの変換部分。0～2πの間にRedが一度Greenに変換されその後Blueに変換されるようにするためには、Redを0から始まるcosカーブ、Greenを2/3πから始まるcosカーブ、Blueを4/3πから始まるcosカーブで変化させればよい。</p>]]></content:encoded>
			<wfw:commentRss>http://ferv.jp/blog/2009/11/03/colormatrixfilter/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>GraphicsPathで円・正多角形・星型正多角形</title>
		<link>http://ferv.jp/blog/2009/10/29/graphicspath-circle-nthpolygon/</link>
		<comments>http://ferv.jp/blog/2009/10/29/graphicspath-circle-nthpolygon/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 18:30:04 +0000</pubDate>
		<dc:creator>dsk</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[GraphicsPath]]></category>

		<guid isPermaLink="false">http://ferv.jp/blog/?p=1025</guid>
		<description><![CDATA[半径から作れるGraphicsPathシリーズで円・正多角形・星型正多角形を描いた。
正確には星型正多角形の外枠？なんていえばいんだろう・・・
定義は星型正多角形を参照。
GraphicsPathで円・正多角形・星 [...]]]></description>
			<content:encoded><![CDATA[<p>半径から作れるGraphicsPathシリーズで円・正多角形・星型正多角形を描いた。<br />
正確には星型正多角形の外枠？なんていえばいんだろう・・・<br />
定義は<a href="http://ja.wikipedia.org/wiki/%E6%98%9F%E5%9E%8B%E6%AD%A3%E5%A4%9A%E8%A7%92%E5%BD%A2">星型正多角形</a>を参照。</p>
<div style="text-align:center;width:465px;"><iframe title="GraphicsPathで円・正多角形・星型正多角形 - wonderfl build flash online" scrolling="no" src="http://wonderfl.net/blogparts/319bae8e3822ada6fe1c556ce0635c4bdfbd6810" width="465" height="490" style="border:1px black solid;"></iframe><a href="http://wonderfl.net/code/319bae8e3822ada6fe1c556ce0635c4bdfbd6810" title="GraphicsPathで円・正多角形・星型正多角形 - wonderfl build flash online">GraphicsPathで円・正多角形・星型正多角形 &#8211; wonderfl build flash online</a></div>
<p>星型正多角形の内接円の半径はこんな感じで求める。</p>
<p><img src="http://ferv.jp/blog/wp-content/uploads/2009/10/RegularStar.png" alt="RegularStar" title="RegularStar" width="465" height="465" class="alignnone size-full wp-image-1027" /></p>]]></content:encoded>
			<wfw:commentRss>http://ferv.jp/blog/2009/10/29/graphicspath-circle-nthpolygon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GraphicsPathでdrawEllipse()する</title>
		<link>http://ferv.jp/blog/2009/10/28/graphicspath-drawellipse/</link>
		<comments>http://ferv.jp/blog/2009/10/28/graphicspath-drawellipse/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:17:00 +0000</pubDate>
		<dc:creator>dsk</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[BezierSegment]]></category>
		<category><![CDATA[GraphicsPath]]></category>

		<guid isPermaLink="false">http://ferv.jp/blog/?p=1006</guid>
		<description><![CDATA[GraphicsPathでdrawRoundRect()する前に、こっちが先だったかも。GraphicsPathでGraphics.drawEllipse()と同様のことができるとどっかで使えそう。QuadraticBe [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ferv.jp/blog/2009/10/28/graphicspath-drawroundrect/">GraphicsPathでdrawRoundRect()する</a>前に、こっちが先だったかも。GraphicsPathでGraphics.drawEllipse()と同様のことができるとどっかで使えそう。<a href="http://www.libspark.org/wiki/dsk/BezierSegment">QuadraticBezierSegment</a>.createEllipseSegments()をほぼコピペで実装できる。<br />
例によって青い線がGraphics.drawEllipse()で、黒い線がGraphicsPathUtil.createEllipse()で作成したGraphicsPathをGraphics.drawGraphicsData()で描画した線。</p>
<div style="text-align:center;width:465px;"><iframe title="GraphicsPathでdrawEllipse()する - wonderfl build flash online" scrolling="no" src="http://wonderfl.net/blogparts/51cdd5384b61f07bf58a63e969dcfcef5f38834a" width="465" height="490" style="border:1px black solid;"></iframe><a href="http://wonderfl.net/code/51cdd5384b61f07bf58a63e969dcfcef5f38834a" title="GraphicsPathでdrawEllipse()する - wonderfl build flash online">GraphicsPathでdrawEllipse()する &#8211; wonderfl build flash online</a></div>
<p>ポイントは、楕円や円は二次ベジェだと4セグメントじゃ近似しきれないから8セグメントで近似するってことと、π/4の倍数でアンカーをとることにすると計算が簡単ってこと。]]></content:encoded>
			<wfw:commentRss>http://ferv.jp/blog/2009/10/28/graphicspath-drawellipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GraphicsPathでdrawRoundRect()する</title>
		<link>http://ferv.jp/blog/2009/10/28/graphicspath-drawroundrect/</link>
		<comments>http://ferv.jp/blog/2009/10/28/graphicspath-drawroundrect/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 16:09:30 +0000</pubDate>
		<dc:creator>dsk</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[BezierSegment]]></category>
		<category><![CDATA[GraphicsPath]]></category>

		<guid isPermaLink="false">http://ferv.jp/blog/?p=992</guid>
		<description><![CDATA[前々回のエントリで、楕円をベジェセグメントで描いたのの応用としてGraphicsPathでGraphics.drawRoundRect()みたいなパスを描いてみた。ついでにWonderflのアカウント忘れたから作ってみた [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ferv.jp/blog/2009/10/27/nthbeziersegment_sparkproject/">前々回のエントリ</a>で、楕円をベジェセグメントで描いたのの応用としてGraphicsPathでGraphics.drawRoundRect()みたいなパスを描いてみた。ついでにWonderflのアカウント忘れたから作ってみた。<br />
例によって後ろの青い線がGraphics.drawRoundRect()で描いた線で、黒い線がGraphicsPathで描いた線。</p>
<div style="text-align:center;width:465px;"><iframe title="GraphicsPathでdrawRoundRect()する - wonderfl build flash online" scrolling="no" src="http://wonderfl.net/blogparts/9d5a6238ffa8c048184e55ab30e2a9c1312cd55d" width="465" height="490" style="border:1px black solid;"></iframe><a href="http://wonderfl.net/code/9d5a6238ffa8c048184e55ab30e2a9c1312cd55d" title="GraphicsPathでdrawRoundRect()する - wonderfl build flash online">GraphicsPathでdrawRoundRect()する &#8211; wonderfl build flash online</a></div>
<p>このエントリとは関係ないけど、GraphicsPathの利点はGraphicsインスタンスをもってなくても描画データのみをインスタンスとして作れるってことだと勝手に思ってる。だから、<a href="http://www.libspark.org/wiki/dsk/BezierSegment">QuadraticBezierSegmentやCubicBezierSegment</a>のgetGraphicsPath()メソッドの戻り値はGraphicsPathなの。</p>]]></content:encoded>
			<wfw:commentRss>http://ferv.jp/blog/2009/10/28/graphicspath-drawroundrect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

