Home > Web Front-end > JS Tutorial > body text

Raphael, a Javascript library for drawing vector graphics in web pages_jquery

WBOY
Release: 2016-05-16 17:43:58
Original
1080 people have browsed it
Raphael is a Javascript library for drawing vector graphics in web pages. It uses SVG W3C recommended standards and VML as the basis for creating graphics. You can operate the DOM through JavaScript to easily create various complex bar charts, pie charts, curve charts and other charts. You can also draw graphics of any shape. Perform complex operations such as cropping and rotating charts or images.

Raphaël is a cross-browser vector graphics library. Currently supported browsers include: Firefox 3.0, Safari 3.0, Chrome 5.0, Opera 9.5 and Internet Explorer 6.0.
Raphael, a Javascript library for drawing vector graphics in web pages_jquery
How to use?
Introduce the raphael.js file into the page, and then you can draw any vector graphics:
Copy code The code is as follows:

// Create a canvas with a width of 320 and a height of 200 at coordinates (10,50)
var paper = Raphael(10, 50, 320, 200);
// Draw a circle with a radius of 10 at coordinates (x = 50, y = 40)
var circle = paper.circle(50, 40, 10);
// Fill the drawn circle with red (#f00 )
circle.attr("fill", "#f00");
// Set the color of the stroke to white
circle.attr("stroke", "#fff");
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template