Raphael a JavaScript library for drawing vector graphics in a Web page _jquery

Source: Internet
Author: User
Tags vector graphics library
Raphael is a Javascript library that is used to draw vector graphics in a Web page. It uses SVG recommended standards and VML as the basis for creating graphics, you can easily create a variety of complex columns, pie charts, graphs, and other graphs by using JavaScript to manipulate the DOM, as well as drawing arbitrary shapes, which can be used for complex operations such as cutting and rotating graphics or images.

Raphaël is a cross-browser vector graphics library that currently supports browsers such as Firefox 3.0+,safari 3.0+,chrome 5.0+,opera 9.5+ and Internet Explorer 6.0+.

How to use it?
Introduce the Raphael.js file to the page, and then you can draw any vector graphic:
Copy Code code as follows:

Create a canvas with a width of 320 and a height of 200 in the coordinates (10,50)
var paper = Raphael (10, 50, 320, 200);
Draw a circle with a radius of 10 in coordinates (x = 40)
var circle = paper.circle (50, 40, 10);
Fill the drawn circle with red (#f00)
Circle.attr ("Fill", "#f00");
Sets the color of the brush (stroke) to white
Circle.attr ("Stroke", "#fff");
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.