<?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>sharedhat - Personal blog of Noritaka Horio &#187; ImageDrawer</title>
	<atom:link href="http://sharedhat.com/tag/imagedrawer/feed/" rel="self" type="application/rss+xml" />
	<link>http://sharedhat.com</link>
	<description>WebデザインからPHP、Javascriptなどのプログラミングに関係する情報を掲載しています。活動中のプロジェクト情報も掲載しています。</description>
	<lastBuildDate>Mon, 11 Apr 2011 05:00:30 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MootoolsのプラグインImageDrawer1.0をリリースしました。</title>
		<link>http://sharedhat.com/project/996/</link>
		<comments>http://sharedhat.com/project/996/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 14:51:52 +0000</pubDate>
		<dc:creator>horry</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[1.0]]></category>
		<category><![CDATA[ImageDrawer]]></category>
		<category><![CDATA[Mootools]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://sharedhat.com/?p=996</guid>
		<description><![CDATA[私が作成したMootoolsのスライドショープラグインでGraduallyというものがあるのですが、画像の描画部分を自由に変更できなくて非常に汎用性がなくて困っていました。 なのでGraduallyの新バージョン開発のた [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sharedhat.com/wp-content/uploads/2010/07/draw.jpg"><img src="http://sharedhat.com/wp-content/uploads/2010/07/draw.jpg" alt="" title="draw" width="670" height="298" class="aligncenter size-full wp-image-1013" /></a></p>
<p>私が作成したMootoolsのスライドショープラグインで<a href="http://mootools.net/forge/p/gradually">Gradually</a>というものがあるのですが、画像の描画部分を自由に変更できなくて非常に汎用性がなくて困っていました。</p>
<p>なので<a href="http://mootools.net/forge/p/gradually">Gradually</a>の新バージョン開発のために、純粋に画像の描画部分だけを抽出しようと思いました。</p>
<p>それが、今回の<a href="http://mootools.net/forge/p/imagedrawer">ImageDrawer</a>になります。<br />
単体で使用してもいいですし、自作の画像ギャラリープラグインにも組み込めます。</p>
<p><span id="more-996"></span></p>
<h3>使用方法</h3>
<p>まずはじめに、mootoolsを読み込みます。<br />
その後にImageDrawer.js、ImageDrawer.Grid.js、ImageDrawer.Expand.jsを読み込みます。</p>
<p>[html]<br />
<script type="text/javascript" src="js/libraries/mootools-1.2.4-core.js"></script><br />
<script type="text/javascript" src="js/ImageDrawer.js"></script><br />
<script type="text/javascript" src="js/ImageDrawer.Grid.js"></script><br />
<script type="text/javascript" src="js/ImageDrawer.Expand.js"></script><br />
[/html]</p>
<p>次にcanvas要素を記述します。<br />
[html]<br />
<canvas id="myCanvas"></canvas><br />
[/html]</p>
<p>そして最後にjavascriptコードを記述します。<br />
[javascript]<br />
var myImage = new Image();<br />
myImage.src = &#8220;images/draw-image.jpg&#8221;;<br />
myImage.onload = function() {<br />
	var myCanvas = document.id(&#8220;myCanvas&#8221;);<br />
	var drawer = new ImageDrawer.Grid({<br />
		&#8216;height&#8217;: 55,<br />
		&#8216;width&#8217;: 65,<br />
		&#8216;transition&#8217;: &#8216;expo:in:out&#8217;,<br />
		&#8216;onDrawStart&#8217;: function() {<br />
			//image drawing start<br />
			log.set(&#8220;html&#8221;, &#8220;Start&#8221;);<br />
		},<br />
		&#8216;onDrawComplete&#8217;: function() {<br />
			//image drawing complete<br />
			log.set(&#8220;html&#8221;, &#8220;Complete&#8221;);<br />
		}<br />
	});</p>
<p>	drawer.setCanvas(myCanvas)<br />
	drawer.setImage(myImage);<br />
	drawer.drawLeft();<br />
}<br />
[/javascript]<br />
オプションのtransitionを変えることで、描画処理時のアニメーションを変更できるようになっています。<br />
詳しくはデモページをご確認ください。</p>
<h4>Demo</h4>
<p><a href="http://holyshared.github.com/ImageDrawer/">http://holyshared.github.com/ImageDrawer/</a></p>
<p>最後にダウンロードは<a href="http://www.mootools.net/forge/">Mootools Forge</a>か下記のダウンロードリンクより可能です。</p>
<h4>Mootools Forge</h4>
<p><a href="http://www.mootools.net/forge/p/imagedrawer">http://www.mootools.net/forge/p/imagedrawer</a></p>
<h4>ダウンロード</h4>
<p><a href="http://www.mootools.net/forge/download/imagedrawer/1.0">http://www.mootools.net/forge/download/imagedrawer/1.0</a><br />
<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://sharedhat.com/project/603/" title="Mootools のプラグインGradually1.0をリリースしました。">Mootools のプラグインGradually1.0をリリースしました。</a></li>
<li><a href="http://sharedhat.com/project/652/" title="Mootoolsのプラグイン「Exhibition.js」をリリースしました。">Mootoolsのプラグイン「Exhibition.js」をリリースしました。</a></li>
<li><a href="http://sharedhat.com/project/1088/" title="Mootoolsの画像ギャラリープラグインGradually 2.0.0をリリースしました。">Mootoolsの画像ギャラリープラグインGradually 2.0.0をリリースしました。</a></li>
<li><a href="http://sharedhat.com/project/703/" title="Mootools Plugin 「MMap」をリリースしました。">Mootools Plugin 「MMap」をリリースしました。</a></li>
<li><a href="http://sharedhat.com/blog/89/" title="MooTools 1.2リリース">MooTools 1.2リリース</a></li>
</ul>
<p><!-- Similar Posts took 3.793 ms --></p>
<div class="wp-social-bookmark-menu"><ul class="socials"><li class="script-style"><a href="http://scriptandstyle.com/submit?url=http://sharedhat.com/project/996/&title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Submit this to Script & Style"> </a></li><li class="blinklist"><a href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=http://sharedhat.com/project/996/&Title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Share this on Blinklist"> </a></li><li class="delicious"><a href="http://del.icio.us/post?url=http://sharedhat.com/project/996/&title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Share this on del.icio.us"> </a></li><li class="digg"><a href="http://digg.com/submit?phase=2&url=http://sharedhat.com/project/996/&title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Digg this!"> </a></li><li class="furl"><a href="http://www.furl.net/storeIt.jsp?t=MootoolsのプラグインImageDrawer1.0をリリースしました。&u=http://sharedhat.com/project/996/" title="Share this on Furl"> </a></li><li class="reddit"><a href="http://reddit.com/submit?url=http://sharedhat.com/project/996/&title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Share this on Reddit"> </a></li><li class="yahoo"><a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?t=MootoolsのプラグインImageDrawer1.0をリリースしました。&u=http://sharedhat.com/project/996/" title="Save this to Yahoo MyWeb"> </a></li><li class="stumble"><a href="http://www.stumbleupon.com/submit?url=http://sharedhat.com/project/996/&title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Stumble upon something good? Share it on StumbleUpon"> </a></li><li class="technorati"><a href="http://technorati.com/faves?add=http://sharedhat.com/project/996/" title="Share this on Technorati"> </a></li><li class="mixx"><a href="http://www.mixx.com/submit?page_url=http://sharedhat.com/project/996/&amp;title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Share this on Mixx"> </a></li><li class="myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=http://sharedhat.com/project/996/&amp;t=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Post this to MySpace"> </a></li><li class="designfloat"><a href="http://www.designfloat.com/submit.php?url=http://sharedhat.com/project/996/&amp;title=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Submit this to DesignFloat"> </a></li><li class="facebook"><a href="http://www.facebook.com/share.php?u=http://sharedhat.com/project/996/&amp;t=MootoolsのプラグインImageDrawer1.0をリリースしました。" title="Share this on Facebook"> </a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://sharedhat.com/project/996/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

