Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is Raphaël using canvas or svg?

I've been looking for a good vector solution, and have heard good things about Raphaël. But all over its docs it talks about defining canvases, which just made me confused.

Is Raphaël a canvas or SVG library?

like image 971
Mark Avatar asked Jun 26 '10 15:06

Mark


People also ask

Should I use canvas or SVG?

SVG gives better performance with smaller number of objects or larger surface. Canvas gives better performance with smaller surface or larger number of objects. SVG can be modified through script and CSS. Canvas can be modified through script only.

What is the difference between the SVG and Canvas?

Differences Between SVG and CanvasSVG is a language for describing 2D graphics in XML. Canvas draws 2D graphics, on the fly (with a JavaScript). SVG is XML based, which means that every element is available within the SVG DOM. You can attach JavaScript event handlers for an element.

Is HTML canvas raster or vector?

Canvas is raster based and composed of pixel.


2 Answers

In order to facilitate cross browser support, Raphael uses both VML and SVG.

Reference

  • https://github.com/DmitryBaranovskiy/raphael
like image 80
Jamie Wong Avatar answered Oct 15 '22 06:10

Jamie Wong


When raphael says canvas it is own terminology and it is not referencing to the HTML5 canvas. It is a layer on top of SVG.

like image 31
Nilesh Avatar answered Oct 15 '22 05:10

Nilesh