Javacript Advanced Programming-canvas Drawing

Source: Internet
Author: User
1. Canvas Drawing

The <canvas> element of HTML5 provides a set of JavaScript APIs that allow us to dynamically create graphs and images. The graph is created in a specific context, and there are two types of context objects currently available.

The first is the 2D context, which can perform the original drawing operation,

L Set Fill, stroke color, and mode

L Draw a rectangle

L Draw Path

L Draw Text

L Create gradients and patterns

The second type is the 3D context, the WEBGL context.

• Vertex and fragment shaders written using GLSL

Supports typed arrays, that is, the ability to limit the data in an array to a specific numeric type

L Create and manipulate textures

The newer versions of mainstream browsers support <canvas> tags, but WEBGL is only supported by Firefox 4+ and Chrome.

Javacript Advanced Programming-canvas Drawing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.