<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>AuthorCode</title>
	
	<link>http://www.authorcode.com</link>
	<description>Find developer resources,code sample,articles, blogs, project samples for creating application in various technology. Free source code and tutorials for Software developers.</description>
	<lastBuildDate>Mon, 06 May 2013 08:06:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AuthorCode" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="authorcode" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>drag and drop only text of the li into textarea in jQuery</title>
		<link>http://www.authorcode.com/drag-and-drop-only-text-of-the-li-into-textarea-in-jquery/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drag-and-drop-only-text-of-the-li-into-textarea-in-jquery</link>
		<comments>http://www.authorcode.com/drag-and-drop-only-text-of-the-li-into-textarea-in-jquery/#comments</comments>
		<pubDate>Sat, 27 Apr 2013 08:59:31 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[drag and drop]]></category>
		<category><![CDATA[JQuery UI]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4471</guid>
		<description><![CDATA[I have written various code snippets for drag and drop element from one to another including drag an element and convert it into another element and then drop with the help of jQuery. This time i will show you how you can drag text or value of the one element and append or insert this [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/drag-li-element-and-drop-to-td-of-the-html-table-using-jquery-ui/' rel='bookmark' title='Drag li element and drop to td of the html table using jQuery UI'>Drag li element and drop to td of the html table using jQuery UI</a> <small>Demo The following example shows how to perform drag and...</small></li>
<li><a href='http://www.authorcode.com/example-drag-and-drop-li-to-div/' rel='bookmark' title='Example &#8211; Drag and Drop li to div'>Example &#8211; Drag and Drop li to div</a> <small>Demo Drag li elements with the mouse anywhere with in...</small></li>
<li><a href='http://www.authorcode.com/drag-and-drop-li-elements-into-textbox/' rel='bookmark' title='Drag and Drop li elements into Textbox'>Drag and Drop li elements into Textbox</a> <small>From the below example you can drag a li element...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I have written various code snippets for drag and drop element from one to another including drag an element and convert it into another element and then drop with the help of jQuery.<br />
This time i will show you how you can drag text or value of the one element and append or insert this text into textarea html element. The code can be useful to create email and newsletter template at run time. The following code will work on all major browser including IE9.<br />
<br/></p>
<div id="content2">
<h2 id="hpermittext" style="line-height: 120%;">
            Demo &#8211; Create E-mail Template(using drag and drop)</h2>
<div class="dragitems">
<h3>
                <span>Available Fields</span></h3>
<ul id="allfields" runat="server">
<li id="node1">Name</li>
<li id="node2">Address</li>
<li id="node3">Phone</li>
<li id="node4">Sender Name</li>
<li id="node5">Sender Address</li>
<li id="node6">Sender Phone</li>
<li id="node7">Sender Email</li>
<li id="node8">Other1</li>
<li id="node9">Other2</li>
<li id="node10">Other3</li>
<li id="node11">Other4</li>
<li id="node12">Other5</li>
</ul></div>
<div class="dropitems">
            <span>Subject: </span><br />
            <input id="txtSubject" runat="server" maxlength="250" style="width: 200px" type="text" /><a href=""> Read HTML5 Canvas Tutorial</a><br />
            <textarea id="TextArea1" cols="50" name="S1" rows="20">Hello HTMl5 canvas Tutorials on Authorcode </textarea>
        </div>
</p></div>
<style type="text/css">
        .textarea{background: #fff;}
        .dragitems{width: 20%; float: left; background: #f1f1f1;}
        .dropitems{width: 70%;float: left;background: #f1f1f1;
                   margin-left: 20px;padding:5px 5px 5px 5px;}
        .dragitems ul{list-style-type: none;padding-left: 5px;
                   display: block;}
        #content2{height: 400px;width: 650px;}
    </style>
<p><br/></p>
<h2> Code</h2>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;title&gt;&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script src=&quot;http://code.jquery.com/ui/1.8.20/jquery-ui.min.js&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script src=&quot;http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.2.js&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script src=&quot;http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .textarea{background: #fff;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .dragitems{width: 20%; float: left; background: #f1f1f1;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .dropitems{width: 70%;float: left;background: #f1f1f1;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;margin-left: 20px;padding:5px 5px 5px 5px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .dragitems ul{list-style-type: none;padding-left: 5px;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;display: block;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; #content{height: 400px;width: 650px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; $(function() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&quot;#allfields li&quot;).draggable({
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; appendTo: &quot;body&quot;,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; helper: &quot;clone&quot;,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor: &quot;select&quot;,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; revert: &quot;invalid&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; initDroppable($(&quot;#TextArea1&quot;));
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function initDroppable($elements) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $elements.droppable({
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hoverClass: &quot;textarea&quot;,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; accept: &quot;:not(.ui-sortable-helper)&quot;,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drop: function(event, ui) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var $this = $(this);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var tempid = ui.draggable.text();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var dropText;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dropText = &quot; {&quot; + tempid + &quot;} &quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var droparea = document.getElementById(&#39;TextArea1&#39;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var range1 = droparea.selectionStart;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var range2 = droparea.selectionEnd;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var val = droparea.value;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var str1 = val.substring(0, range1);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var str3 = val.substring(range1, val.length);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; droparea.value = str1 + dropText + str3;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; });
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;div id=&quot;content&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;h2 id=&quot;hpermittext&quot; style=&quot;line-height: 120%;&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Demo &#8211; Create E-mail Template(using drag and drop)&lt;/h2&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;dragitems&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;h3&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span&gt;Available Fields&lt;/span&gt;&lt;/h3&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ul id=&quot;allfields&quot; runat=&quot;server&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node1&quot;&gt;Name&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node2&quot;&gt;Address&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node3&quot;&gt;Phone&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node4&quot;&gt;Sender Name&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node5&quot;&gt;Sender Address&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node6&quot;&gt;Sender Phone&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node7&quot;&gt;Sender Email&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node8&quot;&gt;Other1&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node9&quot;&gt;Other2&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node10&quot;&gt;Other3&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node11&quot;&gt;Other4&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li id=&quot;node12&quot;&gt;Other5&lt;/li&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ul&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;dropitems&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;span&gt;Subject: &lt;/span&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input id=&quot;txtSubject&quot; runat=&quot;server&quot; maxlength=&quot;250&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; style=&quot;width: 200px&quot; type=&quot;text&quot; /&gt;&lt;a href=&quot;&quot;&gt; Read HTML5 Canvas Tutorial&lt;/a&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;textarea id=&quot;TextArea1&quot; cols=&quot;50&quot; name=&quot;S1&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rows=&quot;20&quot;&gt;Hello HTMl5 canvas Tutorials on Authorcode &lt;/textarea&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/form&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/drag-li-element-and-drop-to-td-of-the-html-table-using-jquery-ui/' rel='bookmark' title='Drag li element and drop to td of the html table using jQuery UI'>Drag li element and drop to td of the html table using jQuery UI</a> <small>Demo The following example shows how to perform drag and...</small></li>
<li><a href='http://www.authorcode.com/example-drag-and-drop-li-to-div/' rel='bookmark' title='Example &#8211; Drag and Drop li to div'>Example &#8211; Drag and Drop li to div</a> <small>Demo Drag li elements with the mouse anywhere with in...</small></li>
<li><a href='http://www.authorcode.com/drag-and-drop-li-elements-into-textbox/' rel='bookmark' title='Drag and Drop li elements into Textbox'>Drag and Drop li elements into Textbox</a> <small>From the below example you can drag a li element...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/drag-and-drop-only-text-of-the-li-into-textarea-in-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text animation small to its full size in HTML5</title>
		<link>http://www.authorcode.com/text-animation-small-to-its-full-size-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=text-animation-small-to-its-full-size-in-html5</link>
		<comments>http://www.authorcode.com/text-animation-small-to-its-full-size-in-html5/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 07:06:56 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Animation in HTML5]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4461</guid>
		<description><![CDATA[&#160; See the Demo. &#160; &#60;html&#62; &#60;head&#62; &#160; &#160; &#60;title&#62;Text small to big Animation&#60;/title&#62; &#160; &#160; &#160; &#160;&#60;script type=&#34;text/javascript&#34;&#62; &#160; &#160; &#160; &#160;var can, ctx, step = 10, steps = 50; &#160; &#160; &#160; &#160; &#160; &#160; &#160; delay = 20; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; function init() { [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/text-rotation-and-scale-in-html5/' rel='bookmark' title='Text rotation and scale in HTML5'>Text rotation and scale in HTML5</a> <small>&nbsp; The following code example demonstrates how to rotate and...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
See the <a href="http://www.authorcode.com/text-animation-in-html5/" target="_blank">Demo</a>.<br />
&nbsp;</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;title&gt;Text small to big Animation&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;&lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;var can, ctx, step = 10, steps = 50;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay = 20;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function init() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; can = document.getElementById(&quot;MyCanvas&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = can.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;blue&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;10pt Helvetica&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textAlign = &quot;center&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textBaseline = &quot;middle&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TextSmallToBig();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function TextSmallToBig() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step++;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.clearRect(0, 0, can.width, can.height);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.save();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.translate(can.width / 2, can.height / 2);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = step + &quot;pt Helvetica&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;Welcome&quot;, 0, 0);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.restore();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (step &lt; steps)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = setTimeout(&#39;TextSmallToBig()&#39;, 20);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;init();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;canvas id=&quot;MyCanvas&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/text-rotation-and-scale-in-html5/' rel='bookmark' title='Text rotation and scale in HTML5'>Text rotation and scale in HTML5</a> <small>&nbsp; The following code example demonstrates how to rotate and...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/text-animation-small-to-its-full-size-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text fade in fade out effect in HTML5</title>
		<link>http://www.authorcode.com/text-fade-in-fade-out-effect-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=text-fade-in-fade-out-effect-in-html5</link>
		<comments>http://www.authorcode.com/text-fade-in-fade-out-effect-in-html5/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 06:59:49 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Animation in HTML5]]></category>
		<category><![CDATA[canvas example]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4462</guid>
		<description><![CDATA[&#160; The following code example shows the text fade in and fade out effect on the canvas in HTMl5. &#160; For this effect we are using the rgb values to set the fillStyle of the text. The program increase the rgb values for the fade-out effect and decrease the rgb values for the fade-in effect. [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/text-style-and-settings-in-html5-canvas/' rel='bookmark' title='Text style and settings in HTML5 canvas'>Text style and settings in HTML5 canvas</a> <small>Text Alignment We can set the text alignment of the...</small></li>
<li><a href='http://www.authorcode.com/text-animation-in-html5/' rel='bookmark' title='Text Animation in HTML5'>Text Animation in HTML5</a> <small>You can create text marquee (i.e. scrolling text left to...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
The following code example shows the text fade in and fade out effect  on the canvas in HTMl5. <span id="more-4462"></span><br />
&nbsp;<br />
For this effect we are using the rgb values to set the fillStyle of the text. The program increase the rgb values for the fade-out effect<br />
and decrease the rgb values for the fade-in effect. See the <a href="http://www.authorcode.com/text-animation-in-html5/" target="_blank">Demo</a>.<br />
&nbsp;</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;title&gt;Text fade in – fade out Animation&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; canvas{border: 1px solid #bbb;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .subdiv{width: 320px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .text{margin: auto; width: 290px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; var can, ctx, step = 50, steps = 255;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay = 20;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var rgbstep = 50;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function init() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; can = document.getElementById(&quot;MyCanvas1&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx= can.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;blue&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;40pt Helvetica&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textAlign = &quot;center&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textBaseline = &quot;middle&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Textfadeup(); &nbsp; &nbsp; &nbsp; &nbsp;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Textfadeup() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rgbstep++;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.clearRect(0, 0, can.width, can.height);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;rgb(&quot; + rgbstep + &quot;,&quot; + rgbstep + &quot;,&quot; + rgbstep + &quot;)&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;WELCOME&quot;, 150, 100);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rgbstep &lt; 255)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = setTimeout(&#39;Textfadeup()&#39;, 10);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rgbstep == 255) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Textfadedown();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function Textfadedown() {
</div>
</li>
<li class="li1">
<div class="de1">rgbstep=rgbstep-1;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.clearRect(0, 0, can.width, can.height);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;rgb(&quot; + rgbstep + &quot;,&quot; + rgbstep + &quot;,&quot; + rgbstep + &quot;)&quot;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;WELCOME&quot;, 150, 100);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rgbstep &gt; 80)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = setTimeout(&#39;Textfadedown()&#39;, 10);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (rgbstep == 80) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Textfadeup();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; } &nbsp;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;init();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;div class=&quot;subdiv&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;canvas id=&quot;MyCanvas1&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/text-style-and-settings-in-html5-canvas/' rel='bookmark' title='Text style and settings in HTML5 canvas'>Text style and settings in HTML5 canvas</a> <small>Text Alignment We can set the text alignment of the...</small></li>
<li><a href='http://www.authorcode.com/text-animation-in-html5/' rel='bookmark' title='Text Animation in HTML5'>Text Animation in HTML5</a> <small>You can create text marquee (i.e. scrolling text left to...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/text-fade-in-fade-out-effect-in-html5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Text Animation in HTML5</title>
		<link>http://www.authorcode.com/text-animation-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=text-animation-in-html5</link>
		<comments>http://www.authorcode.com/text-animation-in-html5/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 18:07:29 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Animation in HTML5]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4457</guid>
		<description><![CDATA[You can create text marquee (i.e. scrolling text left to right and right to left on the canvas) and can create a text animation such as text rotation, text highlight etc. The article demonstrate the following text animations on the canvas. See the Demo. &#160; &#160; &#160; All example, displays the text &#8220;Welcome&#8221; in the [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/text-rotation-and-scale-in-html5/' rel='bookmark' title='Text rotation and scale in HTML5'>Text rotation and scale in HTML5</a> <small>&nbsp; The following code example demonstrates how to rotate and...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>You can create text marquee (i.e. scrolling text left to right and right to left on the canvas) and can create a text animation such as text rotation, text highlight etc.</p>
<p>The article demonstrate the following text animations on the canvas. See the Demo.</p>
<p>&nbsp;<br />
<iframe id="demo" src="http://www.authorcode.com/wp-content/resources/demo/html5/textanimation.html" style="width:620px;height:750px" scrolling="no"><br />
 </iframe></p>
<p>&nbsp;</p>
<div>
<a target="_blank" href="http://affiliate.godaddy.com/redirect/9B6E27212A699D68E4283652352407436BDB301327C9B9D1086ACC9E81FA287DA855A40D93B00D3B0D6F233C8C4805322DF3CF1B33DDF654D1DC834499F01707"><img src="http://affiliate.godaddy.com/ads/9B6E27212A699D68E4283652352407436BDB301327C9B9D1086ACC9E81FA287DA855A40D93B00D3B0D6F233C8C4805322DF3CF1B33DDF654D1DC834499F01707" border="0" width="468"  height="60" alt="50% of Hosting for your Website at GoDaddy.com!"/></a>
</div>
<p>&nbsp;</p>
<p>All example, displays the text &#8220;Welcome&#8221; in the various animation. In the first example the text &#8220;welcome&#8221; is scrolling continuously left to right on the other hand in the second example text is scrolling right to left.And in the third example the text spins in starting small and growing to its full size as it spins. The forth animation displays text small to big size.</p>
<p><br/><br />
Get the Code:</p>
<h3><a href="http://www.authorcode.com/scrolling-text-left-to-right-in-html5/" target="_blank">Example 1 &#8211; Scrolling text left to right  in HTML5</a></h3>
<h3><a href="http://www.authorcode.com/scrolling-text-right-to-left-in-html5/" target="_blank">Example 2 -Scrolling text right to left in HTML5</a></h3>
<h3><a href="http://www.authorcode.com/text-animation-small-to-its-full-size-in-html5/" target="_blank">Example 3 -Text rotation in HTML5</a></h3>
<h3><a href="http://www.authorcode.com/text-animation-small-to-its-full-size-in-html5/" target="_blank">Example 4 -Text animation small to its full size in HTML5</a></h3>
<h3><a href="http://www.authorcode.com/text-fade-in-fade-out-effect-in-html5/" target="_blank">Example 5 &#8211; Text fade-in and fade-out in HTML5 </a></h3>
<p>Thanks</p>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/text-rotation-and-scale-in-html5/' rel='bookmark' title='Text rotation and scale in HTML5'>Text rotation and scale in HTML5</a> <small>&nbsp; The following code example demonstrates how to rotate and...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/text-animation-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text rotation and scale in HTML5</title>
		<link>http://www.authorcode.com/text-rotation-and-scale-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=text-rotation-and-scale-in-html5</link>
		<comments>http://www.authorcode.com/text-rotation-and-scale-in-html5/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 18:04:45 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Animation in HTML5]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4460</guid>
		<description><![CDATA[&#160; The following code example demonstrates how to rotate and scale text on the canvas in HTML5. In the example, text is scaled and rotated repeatedly. The rotation starts with 0 to 2 x Pi radians and in each step increment is 2 * Pi / steps. A scale increment of 1 / steps is [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
The following code example demonstrates how to rotate and scale text on the canvas in HTML5. <span id="more-4460"></span>In the example, text is scaled and rotated repeatedly. The rotation starts with  0 to 2 x Pi radians and  in each step increment is 2 * Pi / steps. A scale increment of 1 / steps is calculated, so the scale will grow to 1 in steps.<br />
&nbsp;<br />
See the <a href="http://www.authorcode.com/text-animation-in-html5/" target="_blank">Demo</a>.<br />
&nbsp;</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;title&gt;Text Animation&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; canvas{border: 1px solid #bbb;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .subdiv{width: 320px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .text{margin: auto; width: 290px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; var can, ctx, addAngle, addScale, step, steps = 150,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay = 20;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function init() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; can = document.getElementById(&quot;MyCanvas1&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = can.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;red&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;20pt Helvetica&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textAlign = &quot;center&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textBaseline = &quot;middle&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addAngle = Math.PI * 2 / steps;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addScale = 1 / steps;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step = 0;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RotateTextSphere()
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function RotateTextSphere() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step++;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.clearRect(0, 0, can.width, can.height);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.save();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.translate(can.width / 2, can.height / 2);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.scale(addScale * step, addScale * step);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.rotate(addAngle * step);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;Welcome&quot;, 0, 0);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.restore();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (step &lt; steps)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = setTimeout(&#39;RotateTextSphere()&#39;, 20);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;init();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;div class=&quot;subdiv&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;canvas id=&quot;MyCanvas1&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;text&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Example &#8211; Text Rotation in HTML5
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/scrolling-text-left-to-right-in-html5/' rel='bookmark' title='Scrolling text left to right  in HTML5'>Scrolling text left to right  in HTML5</a> <small>&nbsp; The Following example demonstrates how to scroll the text...</small></li>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/text-rotation-and-scale-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrolling text left to right  in HTML5</title>
		<link>http://www.authorcode.com/scrolling-text-left-to-right-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=scrolling-text-left-to-right-in-html5</link>
		<comments>http://www.authorcode.com/scrolling-text-left-to-right-in-html5/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 16:47:36 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Animation in HTML5]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4458</guid>
		<description><![CDATA[&#160; The Following example demonstrates how to scroll the text left to right on the canvas in HTML5. The example does not use any CSS for marquee text. Try the example: &#160; &#160;&#60;html&#62; &#60;head&#62; &#160; &#160; &#60;title&#62;Text Animation&#60;/title&#62; &#160; &#160; &#60;style&#62; &#160; &#160; &#160; &#160; canvas{border: 1px solid #bbb;} &#160; &#160; &#160; &#160; .subdiv{width: 320px;} [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
<li><a href='http://www.authorcode.com/text-style-and-settings-in-html5-canvas/' rel='bookmark' title='Text style and settings in HTML5 canvas'>Text style and settings in HTML5 canvas</a> <small>Text Alignment We can set the text alignment of the...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
The Following example demonstrates how to scroll the text left to right on the canvas in HTML5.  The example does not use any CSS for marquee text. Try the example:<span id="more-4458"></span><br />
&nbsp;</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&nbsp;&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;title&gt;Text Animation&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; canvas{border: 1px solid #bbb;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .subdiv{width: 320px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .text{margin: auto; width: 290px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; var can, ctx, step, steps = 0,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay = 20;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function init() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; can = document.getElementById(&quot;MyCanvas1&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = can.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;blue&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;20pt Verdana&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textAlign = &quot;center&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textBaseline = &quot;middle&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step = 0;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; steps = can.width + 50;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RunTextLeftToRight();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function RunTextLeftToRight() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step++;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.clearRect(0, 0, can.width, can.height);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.save();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.translate(step, can.height / 2);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;Welcome&quot;, 0, 0);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.restore();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (step == steps)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step = 0;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (step &lt; steps)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = setTimeout(&#39;RunTextLeftToRight()&#39;, delay);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;init();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;div class=&quot;subdiv&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;canvas id=&quot;MyCanvas1&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;text&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Example 1 &#8211; Marquee Text left to right &#8211; scrolling text
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/scrolling-text-right-to-left-in-html5/' rel='bookmark' title='Scrolling text right to left in HTML5'>Scrolling text right to left in HTML5</a> <small>&nbsp; The Following example gives you an idea to scrolling...</small></li>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
<li><a href='http://www.authorcode.com/text-style-and-settings-in-html5-canvas/' rel='bookmark' title='Text style and settings in HTML5 canvas'>Text style and settings in HTML5 canvas</a> <small>Text Alignment We can set the text alignment of the...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/scrolling-text-left-to-right-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrolling text right to left in HTML5</title>
		<link>http://www.authorcode.com/scrolling-text-right-to-left-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=scrolling-text-right-to-left-in-html5</link>
		<comments>http://www.authorcode.com/scrolling-text-right-to-left-in-html5/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 16:35:24 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Animation in HTML5]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4459</guid>
		<description><![CDATA[&#160; The Following example gives you an idea to scrolling the text on the canvas in HTML5. The example uses the save(), translate() and restore() methods to animate the text. &#160; &#60;html&#62; &#60;head&#62; &#160; &#160; &#60;title&#62;Text Animation&#60;/title&#62; &#160; &#160; &#60;style&#62; &#160; &#160; &#160; &#160; canvas{border: 1px solid #bbb;} &#160; &#160; &#160; &#160; .subdiv{width: 320px;} &#160; [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
<li><a href='http://www.authorcode.com/text-style-and-settings-in-html5-canvas/' rel='bookmark' title='Text style and settings in HTML5 canvas'>Text style and settings in HTML5 canvas</a> <small>Text Alignment We can set the text alignment of the...</small></li>
<li><a href='http://www.authorcode.com/draw-rainbow-with-linear-gradient-in-html5/' rel='bookmark' title='Draw Rainbow with Linear gradient in HTML5'>Draw Rainbow with Linear gradient in HTML5</a> <small>&nbsp; The following snippet shows how to fill a rectangle...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
The Following example gives you an idea to scrolling the text on the canvas in HTML5. The example uses the save(), translate() and restore() methods to animate the text.<span id="more-4459"></span></p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&nbsp; &lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;title&gt;Text Animation&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; canvas{border: 1px solid #bbb;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .subdiv{width: 320px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; .text{margin: auto; width: 290px;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; var can, ctx, step, steps = 0,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay = 20;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function init() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; can = document.getElementById(&quot;MyCanvas1&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = can.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;blue&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;20pt Verdana&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textAlign = &quot;center&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textBaseline = &quot;middle&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step = 0;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; steps = can.height + 50;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RunTextRightToLeft();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; function RunTextRightToLeft() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step++;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.clearRect(0, 0, can.width, can.height);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.save();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.translate(can.width / 2, step);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;Welcome&quot;, 0, 0);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.restore();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (step == steps)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; step = 0;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (step &lt; steps)
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var t = setTimeout(&#39;RunTextRightToLeft()&#39;, delay);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;init();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;div class=&quot;subdiv&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;canvas id=&quot;MyCanvas1&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;text&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Example- Marquee Text(right to light)- scrolling text
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/div&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
<li><a href='http://www.authorcode.com/text-style-and-settings-in-html5-canvas/' rel='bookmark' title='Text style and settings in HTML5 canvas'>Text style and settings in HTML5 canvas</a> <small>Text Alignment We can set the text alignment of the...</small></li>
<li><a href='http://www.authorcode.com/draw-rainbow-with-linear-gradient-in-html5/' rel='bookmark' title='Draw Rainbow with Linear gradient in HTML5'>Draw Rainbow with Linear gradient in HTML5</a> <small>&nbsp; The following snippet shows how to fill a rectangle...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/scrolling-text-right-to-left-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text style and settings in HTML5 canvas</title>
		<link>http://www.authorcode.com/text-style-and-settings-in-html5-canvas/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=text-style-and-settings-in-html5-canvas</link>
		<comments>http://www.authorcode.com/text-style-and-settings-in-html5-canvas/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 12:05:41 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4452</guid>
		<description><![CDATA[Text Alignment We can set the text alignment of the text by setting the context’s textAlign property. The valid values will be left, right, and center. ctx.textAlign = "center"; Text Baseline We can change the text baseline by setting the context’s textBaseline property. The valid values will be top, hanging, middle, alphabetic, ideographic and bottom. [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
<li><a href='http://www.authorcode.com/stroke-and-fill-style-in-html5-canvas/' rel='bookmark' title='Stroke and Fill style in HTML5 canvas'>Stroke and Fill style in HTML5 canvas</a> <small>We use the strokeStyle property with stroke method and fillStyle...</small></li>
<li><a href='http://www.authorcode.com/draw-rectangle-and-circle-shape-in-html5-canvas/' rel='bookmark' title='Draw Rectangle and Circle shape in HTML5 canvas'>Draw Rectangle and Circle shape in HTML5 canvas</a> <small>The following code examples shows a method that creates a...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h3>Text Alignment</h3>
<p>We can set the text alignment of the text by setting the context’s textAlign property. The valid values will be left, right, and center.<span id="more-4452"></span></p>
<p><code>ctx.textAlign = "center";</code></p>
<h3>Text Baseline</h3>
<p>We can change the text baseline by setting the context’s textBaseline property. The valid values will be top, hanging, middle, alphabetic, ideographic and bottom.</p>
<p><code>ctx.textBaseline = "middle";</code></p>
<h3>Change the color of the text</h3>
<p>canvas use the current fill and stroke style for the text. We can set the fillStyle or strokeStyle to change the fore color of the text.<br />
<code>ctx.fillStyle = "blue";</code></p>
<h3>Change the  font of the text</h3>
<p>we use the font property of the canvas context to set the font of the drawn text that will contains the font style, size, and family name.</p>
<p><code>ctx.font = "24pt Verdana";</code><br />
&nbsp;<br />
<img src="http://www.authorcode.com/wp-content/uploads/2013/04/Draw-text-on-canvas-html5.jpg" alt="Draw text on canvas html5" width="370" height="203" class="aligncenter size-full wp-image-4450" /><br />
&nbsp;</p>
<h2>Example</h2>
<p>The following example will draw the string &#8216;Welcome&#8217; on the canvas.</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;title&gt;Draw text&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style type=&quot;text/css&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; #MyCanvas {border:1px solid black;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; function drawText() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ctx;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var canvas = document.getElementById(&quot;MyCanvas&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (canvas.getContext) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = canvas.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillStyle = &quot;Red&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textAlign = &quot;center&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.textBaseline = &quot;middle&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;20pt verdana&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;Welcome&quot;, 100, 100);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;drawText();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;canvas id=&quot;MyCanvas&quot; width=&quot;350&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/draw-text-on-canvas-in-html5/' rel='bookmark' title='Draw Text on canvas in HTML5'>Draw Text on canvas in HTML5</a> <small>&nbsp; You can draw the text on the HTML5 canvas,...</small></li>
<li><a href='http://www.authorcode.com/stroke-and-fill-style-in-html5-canvas/' rel='bookmark' title='Stroke and Fill style in HTML5 canvas'>Stroke and Fill style in HTML5 canvas</a> <small>We use the strokeStyle property with stroke method and fillStyle...</small></li>
<li><a href='http://www.authorcode.com/draw-rectangle-and-circle-shape-in-html5-canvas/' rel='bookmark' title='Draw Rectangle and Circle shape in HTML5 canvas'>Draw Rectangle and Circle shape in HTML5 canvas</a> <small>The following code examples shows a method that creates a...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/text-style-and-settings-in-html5-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Draw Text on canvas in HTML5</title>
		<link>http://www.authorcode.com/draw-text-on-canvas-in-html5/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=draw-text-on-canvas-in-html5</link>
		<comments>http://www.authorcode.com/draw-text-on-canvas-in-html5/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 10:02:37 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[canvas example]]></category>
		<category><![CDATA[canvas in html5]]></category>
		<category><![CDATA[Text on canvas]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4449</guid>
		<description><![CDATA[&#160; You can draw the text on the HTML5 canvas, for it we use the following JavaScript method: &#160; fillText(text, x, y [,maxWidth]) method fills the text in the current fill style. strokeText(text, x, y [,maxWidth]) method outlines the text in the current stroke style. &#160; Both methods uses the following arguments: text: The text [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/draw-rectangle-and-circle-shape-in-html5-canvas/' rel='bookmark' title='Draw Rectangle and Circle shape in HTML5 canvas'>Draw Rectangle and Circle shape in HTML5 canvas</a> <small>The following code examples shows a method that creates a...</small></li>
<li><a href='http://www.authorcode.com/draw-quadratic-curve-in-html5/' rel='bookmark' title='Draw Quadratic Curve in HTML5'>Draw Quadratic Curve in HTML5</a> <small>The quadratic curve requires ending and control points and starting...</small></li>
<li><a href='http://www.authorcode.com/draw-rainbow-with-linear-gradient-in-html5/' rel='bookmark' title='Draw Rainbow with Linear gradient in HTML5'>Draw Rainbow with Linear gradient in HTML5</a> <small>&nbsp; The following snippet shows how to fill a rectangle...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
You can draw the text on the HTML5 canvas, for it we use the following JavaScript method:<br />
&nbsp;<br />
<code>fillText(text, x, y [,maxWidth])</code> method fills the text in the current fill style.<br />
<code>strokeText(text, x, y [,maxWidth])</code> method outlines the text in the current stroke style.<br />
&nbsp;</p>
<p>Both methods uses the following arguments:</p>
<p><strong>text:</strong> The text to draw into the context.<br />
<strong>x:</strong> The X coordinate at which to begin drawing.<br />
<strong>y: </strong>The Y coordinate at which to begin drawing.<br />
<strong>maxWidth(Optional):</strong> the maximum width to draw.<br />
&nbsp;<br />
we use the font property of the canvas context to set the font of the drawn text that will contains the font style, size, and family name.<br />
&nbsp;<br />
<center><br />
<img src="http://www.authorcode.com/wp-content/uploads/2013/04/Draw-text-on-canvas-html5.jpg" alt="Draw text on canvas html5" width="370" height="203" class="aligncenter size-full wp-image-4450" /></center><br />
&nbsp;</p>
<h2>Example</h2>
<p>The following example will draw the string &#8216;Welcome&#8217; on the canvas.</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;title&gt;Draw text&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style type=&quot;text/css&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; #MyCanvas {border:1px solid black;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; function drawText() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ctx;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var canvas = document.getElementById(&quot;MyCanvas&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (canvas.getContext) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = canvas.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.font = &quot;15pt verdana&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.fillText(&quot;Welcome&quot;, 100, 100);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;drawText();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;canvas id=&quot;MyCanvas&quot; width=&quot;350&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/draw-rectangle-and-circle-shape-in-html5-canvas/' rel='bookmark' title='Draw Rectangle and Circle shape in HTML5 canvas'>Draw Rectangle and Circle shape in HTML5 canvas</a> <small>The following code examples shows a method that creates a...</small></li>
<li><a href='http://www.authorcode.com/draw-quadratic-curve-in-html5/' rel='bookmark' title='Draw Quadratic Curve in HTML5'>Draw Quadratic Curve in HTML5</a> <small>The quadratic curve requires ending and control points and starting...</small></li>
<li><a href='http://www.authorcode.com/draw-rainbow-with-linear-gradient-in-html5/' rel='bookmark' title='Draw Rainbow with Linear gradient in HTML5'>Draw Rainbow with Linear gradient in HTML5</a> <small>&nbsp; The following snippet shows how to fill a rectangle...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/draw-text-on-canvas-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bezier curve in HTML5 canvas</title>
		<link>http://www.authorcode.com/bezier-curve-in-html5-canvas/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bezier-curve-in-html5-canvas</link>
		<comments>http://www.authorcode.com/bezier-curve-in-html5-canvas/#comments</comments>
		<pubDate>Thu, 11 Apr 2013 13:34:50 +0000</pubDate>
		<dc:creator>Hirendra Sisodiya</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[canvas example]]></category>
		<category><![CDATA[canvas in html5]]></category>

		<guid isPermaLink="false">http://www.authorcode.com/?p=4433</guid>
		<description><![CDATA[&#160; The bezier curve requires ending points and two control points and starting points will be current point. You can use the beginPath and moveTo methods to set a starting point. &#160; &#160; We use the bezierCurveTo method to draw a bezier curve. ctx.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x, y); cpx1 and cpy1: are the first [...]<div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:<ol>
<li><a href='http://www.authorcode.com/draw-quadratic-curve-in-html5/' rel='bookmark' title='Draw Quadratic Curve in HTML5'>Draw Quadratic Curve in HTML5</a> <small>The quadratic curve requires ending and control points and starting...</small></li>
<li><a href='http://www.authorcode.com/radial-gradient-in-html5/' rel='bookmark' title='Radial gradient in HTML5'>Radial gradient in HTML5</a> <small>The another type of the gradient is Radial gradient that...</small></li>
<li><a href='http://www.authorcode.com/linear-gradient-in-html5/' rel='bookmark' title='Linear gradient in HTML5'>Linear gradient in HTML5</a> <small>A gradient effect specifies a starting color, an ending color,...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
The bezier curve requires ending points and two control points and starting points will be current point. You can use the <strong>beginPath </strong>and <strong>moveTo </strong>methods to set a starting point.<span id="more-4433"></span><br />
&nbsp;<br />
<img src="http://www.authorcode.com/wp-content/uploads/2013/04/bezier-curve-in-html5.jpg" alt="bezier curve in html5" width="550" height="633" class="aligncenter size-full wp-image-4448" /><br />
&nbsp;<br />
We use the bezierCurveTo method to draw a bezier curve.</p>
<p><code>ctx.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x, y);</code></p>
<p><strong>cpx1 and cpy1:</strong>  are the first control points of the bezier curve.<br />
<strong>cpx2 and cpy2:</strong>  are the second control points of the bezier curve.<br />
<strong>x and y:</strong>  are the ending points of the bezier curve.<br />
&nbsp;</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;title&gt;Draw Arc&lt;/title&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;style type=&quot;text/css&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; #MyCanvas {border:1px solid black;}
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;/style&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; function drawGradient() {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var ctx;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var canvas = document.getElementById(&quot;MyCanvas&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (canvas.getContext) {
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx = canvas.getContext(&quot;2d&quot;);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Draw a quadratic curve .
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.beginPath();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.lineWidth = &quot;2&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.strokeStyle = &quot;black&quot;;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.moveTo(50, 150);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.bezierCurveTo(200, 200, 200, 0, 300, 100);
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.stroke();
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; }
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/head&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;body onload=&quot;drawGradient();&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &lt;canvas id=&quot;MyCanvas&quot; width=&quot;400&quot; height=&quot;200&quot;&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; This browser or document mode doesn&#39;t support canvas object&lt;/canvas&gt;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp;&lt;/body&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>Thanks for reading, check out <a href="http://www.authorcode.com">AuthorCode</a> for more Authorcode contents</p><div class='yarpp-related-rss'>
<hr><p style="font-size:16px;color:#F76D00">Related posts:</p><ol>
<li><a href='http://www.authorcode.com/draw-quadratic-curve-in-html5/' rel='bookmark' title='Draw Quadratic Curve in HTML5'>Draw Quadratic Curve in HTML5</a> <small>The quadratic curve requires ending and control points and starting...</small></li>
<li><a href='http://www.authorcode.com/radial-gradient-in-html5/' rel='bookmark' title='Radial gradient in HTML5'>Radial gradient in HTML5</a> <small>The another type of the gradient is Radial gradient that...</small></li>
<li><a href='http://www.authorcode.com/linear-gradient-in-html5/' rel='bookmark' title='Linear gradient in HTML5'>Linear gradient in HTML5</a> <small>A gradient effect specifies a starting color, an ending color,...</small></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.authorcode.com/bezier-curve-in-html5-canvas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: www.authorcode.com @ 2013-05-24 16:41:16 by W3 Total Cache -->
