0

Recently i found the raphael's library which is amazing. For example this:

Raphael Chart -Demo

When I checked the code I was shocked(in a positive way).

It didn't used HTML5 canvas or any extra divs like here (which a don't like)

My question is: How exactly this works in detail? Is pixel manipulation? What is the basic rendering code?

Thank you!

4

2 回答 2

2

Primarily it uses SVG which is an XML-like markup to represent vectors. For < IE9 browsers, I think it uses VML which is a deprecated vector mark-up that IE still supports.

SVG/VML 是矢量图形的形式。它们的形状由数学公式表示。这使得它们适用于可缩放图形,因为公式在缩放时会重新计算,保持锐利的边缘,这与像素化的光栅图形不同。

于 2012-05-25T19:01:41.387 回答
-1

Inspect the source with firebug or Chrome's inspector. It generates SVG.

于 2012-05-25T18:59:17.333 回答