Here are some samples and brief explanation of HTML5 Canvas text related functions. A HTML5 compliant browser (such as Firefox 3.5) is required in order for the examples to work. Basic Text   Use strokeText or fillText, both takes x, y and maximumWidth. The colors are determined by the fillStyle and strokeStyle <script language=”JavaScript”> function […]

I am using WordPress 2.9 for this example: Open Appearance -> Editor. Locate the php file that is being used to display categories.  It’s either Archieves.php or Categories.php.  You can echo something and open up a category page in the browser to see which one is being used. You can also edit the file in […]

There are built in library to do RSS Feeds, but won’t it be nice to build our own and be able to customize the output.  PHP 5 or later is needed for this method because it uses SimpleXML. Below are some useful links that we use in this tutorial. SimpleXML overview and example: https://permadi.com/blog/2010/02/parsing-xml-in-php-using-simplexml/. SimpleXML […]

Here are some plug-ins that enables execution of PHP code within a WordPress post (I am using WordPress 2). http://wordpress.org/extend/plugins/exec-php/  Read this if it doesn’t work: https://permadi.com/wordpress2/wp-content/plugins/exec-php/docs/readme.html#execute_php http://www.nosq.com/blog/2006/01/runphp-plugin-for-wordpress/ http://www.hongkiat.com/blog/execute-php-in-wordpress-post-page-and-widget-sidebar/ For these to work, it’s best to use the HTML editor when editing posts, not the Visual editor.  I also find that toggling ftom HTML to Visual […]

As web developers, it is crucial to test on various browsers. A common problem is testing multiple Internet Explorer versions on the same Windows system, since Internet Explorer overwrites previous version during upgrade.  Follow this links that explains how to install multiple versions: http://tredosoft.com/Multiple_IE http://labs.insert-title.com/Multiple-IEs-in-Windows_article795.aspx There is also a free software named IETester, from http://www.my-debugbar.com/wiki/IETester/HomePage […]

For your reference, here’s Part 1 and Part 2. If the example doesn’t work, it was because Part 1 and 2 uses the same variables. Open this guide as a separate page to fix it. Also remember that you need a browser that supports Canvas, such as Firefox 3. Before you start drawing lines, you […]

HTML

Here’s a silly demo I made with HTML 5 Canvas object. You need a browser that supports Canvas such as Firefox 3. Warning: you will need to use the browser’s Back button to navigate away from the page. https://permadi.com/blog/?p=383 See the tutorial.

This example uses Canvas to flip an image.  For introduction to Canvas, please see https://www.permadi.com/tutorial/jsCanvasGrayscale/index.html. With Canvas, developers gains the access to pixels data of any images loaded.  To flip an image, we can iterate every row of the image and copy the pixels backward. Please upgrade your browser function flipImage(image) { var myCanvas=document.createElement(“canvas”); var […]