Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Saturday, April 16, 2011

HTML5 Canvas element


One of the existing development on the HTML 5 is the Canvas element. HTML5 Canvas element is a miracle that allows web designers to embed interactive visual images via the HTML language. With a variety of credit attributes, providing the output is quite similar to the original web software used in the preparation of dynamic images and animation.

How does it work?

A wide assortment of methods and properties bring life into a web page using the canvas element. To draw a rectangle, gradient fill and transformation to scale and rotate, JavaScript is used. Bezier curves and arcs can also be integrated to obtain the desired interface.

Such as image tags, canvas elements using attributes such as width and height. Id is required to identify with JavaScript or other scripting language. By defining the canvas tag in this way, the layout is rendered invisible on web pages. The elements of style sheets such as borders, background colors or margins help reveal the true picture of the canvas on the screen. Standard color is always black. Tags using a color attribute to use RGB or hexadecimal value.

To create fillRect rectangular (x, y, w, h) the syntax used to create a rectangle on the screen when strokeRect (x, y, w, h) defines the use of border or stroke. fillStyle () and strokeStyle () sets form a pattern, specific colors and gradients. x and y coordinates are assigned values. The size of the value indicated by w and h. Some roads with a few strokes can be made on line beginPath () and closePath () at the beginning and end of the road. As the gradient rectangle, diagonal or other also has four arguments in which the two first shows the starting point and the last two end points of the gradient. However, the radial gradient using the six arguments where the three arguments is to circle from the starting point and the remaining three to circle for the end point. To make a straight line, moveTo () and lineTo () method is used. For character input in canvas tag, there are three attributes that can be used; fonts, textAlign, textBaseline To return the object to draw, getContext () method is used where the 2d context of the more popular methods.

Canvas Support!

Canvas elements supported by the latest versions of browsers and mobile devices such as Internet Explorer, Firefox, Safari, Chrome, Opera, iPhone and Android. In case the browser is not working with canvas and then fill fallback element is inserted in an image tag between the opening and closing tags canvas. In other words, the content is a fallback image file that will be displayed if the canvas element is not supported in the browser. JavaScript uses document.addEventListener (DOMContentLoaded) syntax to load the page.

HTML5 Canvas element most prominently used for animations and moving objects. It is somewhat inevitable to display static images. Needs dynamic output every hour and every day throughout the year targeted by the canvas tag. canvas tag is often used by websites that run on JavaScript. Compared with Adobe Flash, it loads fast and has become the latest craze on the world wide web.

Source: www.enzinearticles.com

Thursday, August 5, 2010

Java

Java is a highly portable computer programming language. "Portable" is a term used to describe programs that can be run in many different computing environments and on many different "platforms" (MS Windows, Apple's Mac OS, Solaris, and Linux are all examples of "platforms")

It is Java's portability that makes it such an intriguing technology. To give you an example of how this portability relates to real world features and benefits, let's say you have a program that is written in Java such as a web browser. Normally, with a web browser application, the user is bound to the settings for the browser application and the configuration of the machine that they are using it on. So, at the office, the machine on Joe User's desktop has one set of bookmarks, plug ins, security setting, etc. Joe's machine at home will most likely have a different set of bookmarks, plug ins and settings. Now, let's say Joe want to have a more consistent experience with the computers that he uses everyday. Joe could install a Java-based browser on removable writable media (such as a floppy diskette, pen drive, zip disk or CDRW) and carry his browser with him (with all the settings, bookmarks and plug ins in tow as well!)

Java is not only portable, but it is also widely known, and does not need to be interpreted (like PHP, Java script and some other and other languages). Java also does not have to be compiled on the machine it will be run on. Java can be compiled once and run in its binary form on many systems. Although there are other languages out there that are extremely portable, there are few that could stand up to Java's "compile once, run everywhere" functionality. Java is truly a useful and feature rich programming language and is used to program many software programs on the market today.
Source: Free Articles