SlideShare a Scribd company logo
Raphael.Js
Mohd Saeed Khan
UI Developer
Cross Browser Vector Graphics
Creating Graphics which never dies,
By Using
Raphaël v.2.1.0
Raphaël helps you work
with SVG just like jQuery
to manipulate the DOM
Size:-
Minified : 89 KB
GZIP : 58 KB
Vector v/s Raster
• Vector : Mathematical Representation of Shapes.
Rendered at runtime(SVG, Canvas)
• Raster : Rectangular grid of pixels
Pre-render before runtime(jpg, png)
SVG
Raphael.Js
VML
SVG VML
Raphaël
Not use
Canvas
SVG, VML, Canvas
SVG :- Scalable Vector Graphics by W3C in 1999
VML :- Vector Markup Language by Autodesk,
Hewlett-Packard, Macromedia,
Microsoft in 1989 and submitted to W3C in 1998
Canvas :- Raster-based, By Apple in 2004
Raphael.js
SVG Canvas VML
Representation DOM Nodes Pixels DOM Nodes
Scalability Vector Raster Vector
Event Handling DOM Events Pixel Cords DOM Events
Browser Support IE9+, all majors IE9+, all majors Only IE
browser
Mobile Support Yes Yes Windows
Accessibility Yes No Yes
Image Save No Yes(PNG or JPG) No
SVG v/s Canvas v/s VML
Image v/s SVG(Vector)
How to check that browser
support SVG/Canvas ?
Does Browser Support Canvas…?
If(window.CanvasRenderingContex2D){
//….your code..
}
Does Browser Support SVG..?
If(window.SVGAngle){
//…your code…
}
Size Does Matter
Very easy to use…(Syntex)
Create your canvas:
var paper = Raphael(document.getElementById(”Cont_Id"),
320, 200);
Draw on it:
var c = paper.circle(300, 200, 60);
var p = paper.path("M10 10 l90 90");
var q = paper.rect(X,Y, W,H);
Set attributes
c.attr({
"fill”: "#f00”,
“stroke-width”: 0
});
Example
W H
x y r
Supports…
specially you
Generic and non-generic..
Creating generic API and non-generic file
.Js File
Raphael quality
at Same Size
2X 3X
Graph shows salary across the company
Graph shows salary within the company
Salary according to the Average Experience
Paycheck load time
Using Raphael
Paycheck load time
Using images
Firebug Stats
2.68s
Load time difference
Total download time if page having 10 different graphs/images
Before cache Before cache
After cache
343 milliseconds
278 milliseconds 794 milliseconds
2.68 seconds
After cache
Raphael v/s Image
Demos…
• RaphaelAnimation.htm
• RaphaelBouncer.htm
• RaphaelPie Chart.htm
• RaphaelInteractive Chart.htm
• RaphaelAustralia.htm
• RaphaelGear.htm
• RaphaelTiger.htm
• http://raphaeljs.com/scape/
Raphael.js
Contact:
saeed3e@gmail.com
+91-7503438005

More Related Content

PPTX
Svghtml5 Meetup
PDF
Canvas Based Presentation tool - First Review
PPTX
Computer class Software/Hardware Presentation
PPTX
Web components
PDF
SXSW 2016 takeaways
PDF
Raphaël JS Conf
PDF
RaphaêL + JSConf
PPTX
101207 raphael
Svghtml5 Meetup
Canvas Based Presentation tool - First Review
Computer class Software/Hardware Presentation
Web components
SXSW 2016 takeaways
Raphaël JS Conf
RaphaêL + JSConf
101207 raphael

Similar to Raphael.js (20)

ZIP
Vector Graphics on the Web: SVG, Canvas, CSS3
PDF
Making burgers with JavaScript
PDF
Before Going Vector
PDF
Web Vector Graphics
PDF
First review presentation
KEY
Visualizing data on web
PPTX
introduction of HTML canvas and styles .pptx
PPTX
Easy charting with
PDF
Second review presentation
PPT
Svg Overview And Js Libraries
PPTX
Html5 canvas
PPT
Using SVG with Ample SDK cross browser
PDF
Introduction to Canvas and Native Web Vector Graphics
PDF
London Ajax User Group Meetup: Vector Graphics
PDF
Raphaël and You
PDF
Zeroth review presentation
PPTX
Academy PRO: HTML5 API graphics
PDF
Advanced Web Graphics with Canvas
ODP
Interactive Vector-Graphics in the Browser
 
PPTX
Scalable vector graphics(svg)
Vector Graphics on the Web: SVG, Canvas, CSS3
Making burgers with JavaScript
Before Going Vector
Web Vector Graphics
First review presentation
Visualizing data on web
introduction of HTML canvas and styles .pptx
Easy charting with
Second review presentation
Svg Overview And Js Libraries
Html5 canvas
Using SVG with Ample SDK cross browser
Introduction to Canvas and Native Web Vector Graphics
London Ajax User Group Meetup: Vector Graphics
Raphaël and You
Zeroth review presentation
Academy PRO: HTML5 API graphics
Advanced Web Graphics with Canvas
Interactive Vector-Graphics in the Browser
 
Scalable vector graphics(svg)
Ad

Recently uploaded (20)

PDF
August Patch Tuesday
PDF
Machine learning based COVID-19 study performance prediction
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Tartificialntelligence_presentation.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
August Patch Tuesday
Machine learning based COVID-19 study performance prediction
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Building Integrated photovoltaic BIPV_UPV.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Reach Out and Touch Someone: Haptics and Empathic Computing
Tartificialntelligence_presentation.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Mushroom cultivation and it's methods.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
cloud_computing_Infrastucture_as_cloud_p
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
Ad

Raphael.js

Editor's Notes

  • #4: Vector images are made of hundreds of thousands of tiny lines and curves (or paths) to create an image Raster images are often called bitmap images because they are made of millions of tiny squares, called pixels. You can identify a raster or bitmap image by looking at it very closely. Example showing effect of vector graphics versus raster graphics. The original vector-based illustration is at the left. The upper-right image illustrates magnification of 7x as a vector graphic. The lower-right illustrates the same magnification as a raster (bitmap) graphic. Raster images are based on pixels and so when scaled there is a loss of clarity, while vector-based graphics can be scaled by any amount without degrading quality.
  • #5: How raphel merge SVG and VML? By using javascript merge both technology and make a amzing API which support mostly all the browser..
  • #6: Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics that has support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. Vector Markup Language (VML) is an XML-based file format for two-dimensional vector graphics in 1989. Canvas was initially introduced by Apple for use inside their own Mac OS X WebKit component in 2004,[1] powering applications like Dashboard widgets and the Safari browser. Later, in 2005 it was adopted in version 1.8 of Gecko browsers,[2] and Opera in 2006,[3] and standardized by the Web Hypertext Application Technology Working Group (WHATWG) on new proposed specifications for next generation web technologies.[citation needed]
  • #7: Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics that has support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. Vector Markup Language (VML) is an XML-based file format for two-dimensional vector graphics in 1989. Canvas was initially introduced by Apple for use inside their own Mac OS X WebKit component in 2004,[1] powering applications like Dashboard widgets and the Safari browser. Later, in 2005 it was adopted in version 1.8 of Gecko browsers,[2] and Opera in 2006,[3] and standardized by the Web Hypertext Application Technology Working Group (WHATWG) on new proposed specifications for next generation web technologies.[citation needed]
  • #11: SVG is an earlier standard for drawing shapes in browsers. However, unlike Canvas which is raster-based, SVG is vector-based, i.e., each drawn shape is remembered as an object in a scene graph or Document Object Model, which is subsequently rendered to a bitmap. This means that if attributes of an SVG object are changed, the browser can automatically re-render the scene. In the Canvas example above, once the rectangle is drawn, the fact that it was drawn is forgotten by the system. If its position were to be changed, the entire scene would need to be redrawn, including any objects that might have been covered by the rectangle. But in the equivalent SVG case, one could simply change the position attributes of the rectangle and the browser would determine how to repaint it. There are additional JavaScript libraries that add scene-graph capabilities to the Canvas element. It is also possible to paint a canvas in layers and then recreate specific layers. SVG images are represented in XML, and complex scenes can be created and maintained with XML editing tools. The SVG scene graph enables event handlers to be associated with objects, so a rectangle may respond to an onClick event. To get the same functionality with canvas, one must manually match the coordinates of the mouse click with the coordinates of the drawn rectangle to determine whether it was clicked. Conceptually, canvas is a lower-level API upon which an engine, supporting for example SVG, might be built. There are JavaScript libraries that provide partial SVG implementations using Canvas for browsers that do not provide SVG but support Canvas. However, this is not (normally) the case—they are independent standards. The situation is complicated because there are scene graph libraries for Canvas, and SVG has some bitmap manipulation functionality.
  • #12: Responsive layout…