際際滷

際際滷Share 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

Similar to Raphael.js (20)

ZIP
Vector Graphics on the Web: SVG, Canvas, CSS3
Pascal Rettig
PDF
Making burgers with JavaScript
Diogo Antunes
PDF
Before Going Vector
david deraedt
PDF
Web Vector Graphics
Dmitry Baranovskiy
PDF
First review presentation
Srikrishnan Suresh
KEY
Visualizing data on web
Matja転 Horvat
PPTX
introduction of HTML canvas and styles .pptx
hannahroseline2
PPTX
Easy charting with
Major Ye
PDF
Second review presentation
Srikrishnan Suresh
PPT
Svg Overview And Js Libraries
seamusjr
PPTX
Html5 canvas
tnsuarez
PPT
Using SVG with Ample SDK cross browser
Sergey Ilinsky
PDF
Introduction to Canvas and Native Web Vector Graphics
dylanks
PDF
London Ajax User Group Meetup: Vector Graphics
dylanks
PDF
Rapha谷l and You
Trotter Cashion
PDF
Zeroth review presentation
Srikrishnan Suresh
PPTX
Academy PRO: HTML5 API graphics
Binary Studio
PDF
Advanced Web Graphics with Canvas
Jason Harwig
ODP
Interactive Vector-Graphics in the Browser
tec
PPTX
Scalable vector graphics(svg)
Pradip Mudi
Vector Graphics on the Web: SVG, Canvas, CSS3
Pascal Rettig
Making burgers with JavaScript
Diogo Antunes
Before Going Vector
david deraedt
Web Vector Graphics
Dmitry Baranovskiy
First review presentation
Srikrishnan Suresh
Visualizing data on web
Matja転 Horvat
introduction of HTML canvas and styles .pptx
hannahroseline2
Easy charting with
Major Ye
Second review presentation
Srikrishnan Suresh
Svg Overview And Js Libraries
seamusjr
Html5 canvas
tnsuarez
Using SVG with Ample SDK cross browser
Sergey Ilinsky
Introduction to Canvas and Native Web Vector Graphics
dylanks
London Ajax User Group Meetup: Vector Graphics
dylanks
Rapha谷l and You
Trotter Cashion
Zeroth review presentation
Srikrishnan Suresh
Academy PRO: HTML5 API graphics
Binary Studio
Advanced Web Graphics with Canvas
Jason Harwig
Interactive Vector-Graphics in the Browser
tec
Scalable vector graphics(svg)
Pradip Mudi

Recently uploaded (20)

PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
PDF
Scaling i.MX Applications Processors Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
PPTX
The birth and death of Stars - earth and life science
rizellemarieastrolo
PDF
Unlocking FME Flows Potential: Architecture Design for Modern Enterprises
Safe Software
PPTX
Practical Applications of AI in Local Government
OnBoard
PDF
Next level data operations using Power Automate magic
Andries den Haan
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
PDF
99 Bottles of Trust on the Wall Operational Principles for Trust in Cyber C...
treyka
PPTX
Enabling the Digital Artisan keynote at ICOCI 2025
Alan Dix
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
PDF
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) 際際滷s
Ravi Tamada
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
Scaling i.MX Applications Processors Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
The birth and death of Stars - earth and life science
rizellemarieastrolo
Unlocking FME Flows Potential: Architecture Design for Modern Enterprises
Safe Software
Practical Applications of AI in Local Government
OnBoard
Next level data operations using Power Automate magic
Andries den Haan
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
My Journey from CAD to BIM: A True Underdog Story
Safe Software
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
99 Bottles of Trust on the Wall Operational Principles for Trust in Cyber C...
treyka
Enabling the Digital Artisan keynote at ICOCI 2025
Alan Dix
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) 際際滷s
Ravi Tamada
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
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 casethey 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