SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Raphaël http://github.com/VinylFox/JSMag/tree/master/2010/May
What is Raphaël?
Miguel Rafael Martos Sánchez
No, Really We can make crooked lines
The Technology ,[object Object]
VML (some other shit)
Browser Support ,[object Object]
FF 3+
Safari 3+
Opera 9.5+
Chrome?
Why? ,[object Object]
Inconsistent API
No pixels
jQuery for Vector graphics
Using Raphaël  var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . rect ( 1 , 1 , 50 , 20 ) ;
The Markup VML: <v:rect style=&quot;width:50;height:20&quot; strokeweight=&quot;1&quot; /> SVG: <rect width=&quot;50&quot; height=&quot;20&quot; style=&quot;fill:white;stroke:black&quot;  x=&quot;1&quot; y=&quot;1&quot;/>
Using Raphaël  var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . rect ( 1 , 1 , 50 , 20 ); X & Y top left  of rectangle
Using Raphaël  var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . rect ( 1 , 1 , 50 , 20 ); X & Y top left  of rectangle Width & Height Of rectangle
Shapes ,[object Object]
Circle
Ellipse
Path
Play Along http://raphaeljs.com/playground.html
Rectangle var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . rect ( 1 , 1 , 50 , 20,10 ); X & Y top left  of rectangle Width & Height Of rectangle Corner radius
 
Circle var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . circle ( 100 , 100 , 50 ); X & Y center  Of circle Radius
 
Ellipse var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . ellipse ( 100 , 120 , 50,100 ); X & Y center  Of ellipse Radius X Radius Y
 
Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end
Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point
Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point cubic Bézier End point cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point
Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point cubic Bézier End point cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point Close path
Command Driven M = Move to without drawing L = Draw while moving to new point H, V, Z are other straight line commands Lowercase/Uppercase = Relative/Absolute http://www.w3.org/TR/SVG/paths.html#PathData
M - Move
L - Line
H, V & Z H – Move horizontally only V – Move vertically only Z – Close path to start point
Straight Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105');
Straight Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y
Straight Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y Line to L X Y
Straight Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y Line to L X Y Move again M X Y
Straight Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y Line to L X Y Move again M X Y Draw more lines L X,Y X,Y X,Y
 
Command Driven C/S = Cubic Bézier curve Q/T = Quadratic Bézier curve A = Arc Lowercase/Uppercase = Relative/Absolute http://www.w3.org/TR/SVG/paths.html#PathData
Curved Paths var  paper   =   Raphael ( 'hangman' ,   600 ,   600 ); paper . path ( 'M100,200 C100,50 350,50 350,200' ) . attr ( { stroke : '#ff0000' , &quot;stroke-width&quot; : 2 } ); paper . path ( 'M110,200 C110,60 340,60 340,200' ) . attr ( { stroke : '#00ff00' , &quot;stroke-width&quot; : 2 } );

Weitere ähnliche Inhalte

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Bmore On Rails - Raphael Paths Intro

  • 4. No, Really We can make crooked lines
  • 5.
  • 7.
  • 12.
  • 15. jQuery for Vector graphics
  • 16. Using Raphaël var paper = Raphael ( 'hangman' , 600 , 600 ); paper . rect ( 1 , 1 , 50 , 20 ) ;
  • 17. The Markup VML: <v:rect style=&quot;width:50;height:20&quot; strokeweight=&quot;1&quot; /> SVG: <rect width=&quot;50&quot; height=&quot;20&quot; style=&quot;fill:white;stroke:black&quot; x=&quot;1&quot; y=&quot;1&quot;/>
  • 18. Using Raphaël var paper = Raphael ( 'hangman' , 600 , 600 ); paper . rect ( 1 , 1 , 50 , 20 ); X & Y top left of rectangle
  • 19. Using Raphaël var paper = Raphael ( 'hangman' , 600 , 600 ); paper . rect ( 1 , 1 , 50 , 20 ); X & Y top left of rectangle Width & Height Of rectangle
  • 20.
  • 23. Path
  • 25. Rectangle var paper = Raphael ( 'hangman' , 600 , 600 ); paper . rect ( 1 , 1 , 50 , 20,10 ); X & Y top left of rectangle Width & Height Of rectangle Corner radius
  • 26.  
  • 27. Circle var paper = Raphael ( 'hangman' , 600 , 600 ); paper . circle ( 100 , 100 , 50 ); X & Y center Of circle Radius
  • 28.  
  • 29. Ellipse var paper = Raphael ( 'hangman' , 600 , 600 ); paper . ellipse ( 100 , 120 , 50,100 ); X & Y center Of ellipse Radius X Radius Y
  • 30.  
  • 31. Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end
  • 32. Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point
  • 33. Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point cubic Bézier End point cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point
  • 34. Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('m 27.165,49.021 c 0.364,-0.299 0.768,-0.55 1.181,-0.773 0.355,-0.191 0.731,-0.333 1.121,-0.433 0.261,-0.067 0.529,-0.081 0.797,-0.061 0.134,0.01 0.645,0.271 0.435,-0.052 0.192,0.295 0.417,0.579 0.682,0.812 0.189,0.167 0.266,0.118 0.122,-0.103 -0.677,-1.039 -1.494,-1.971 -2.831,-1.78 -0.89,0.126 -1.785,0.676 -2.47,1.24 -0.128,0.105 0.83,1.259 0.963,1.15 l 0,0 z'); Move/Start point M X Y cubic Bézier options Multiple control points and an end cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point cubic Bézier End point cubic Bézier End point cubic Bézier Conrol point cubic Bézier Conrol point Close path
  • 35. Command Driven M = Move to without drawing L = Draw while moving to new point H, V, Z are other straight line commands Lowercase/Uppercase = Relative/Absolute http://www.w3.org/TR/SVG/paths.html#PathData
  • 38. H, V & Z H – Move horizontally only V – Move vertically only Z – Close path to start point
  • 39. Straight Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105');
  • 40. Straight Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y
  • 41. Straight Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y Line to L X Y
  • 42. Straight Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y Line to L X Y Move again M X Y
  • 43. Straight Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ('M 380,385 L 505,385 M 435,385 L 435,85 565,85 565,105'); Move/Start point M X Y Line to L X Y Move again M X Y Draw more lines L X,Y X,Y X,Y
  • 44.  
  • 45. Command Driven C/S = Cubic Bézier curve Q/T = Quadratic Bézier curve A = Arc Lowercase/Uppercase = Relative/Absolute http://www.w3.org/TR/SVG/paths.html#PathData
  • 46. Curved Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ( 'M100,200 C100,50 350,50 350,200' ) . attr ( { stroke : '#ff0000' , &quot;stroke-width&quot; : 2 } ); paper . path ( 'M110,200 C110,60 340,60 340,200' ) . attr ( { stroke : '#00ff00' , &quot;stroke-width&quot; : 2 } );
  • 47. Curved Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ( 'M100,200 C100,50 350,50 350,200' ) . attr ( { stroke : '#ff0000' , &quot;stroke-width&quot; : 2 } ); paper . path ( 'M110,200 C110,60 340,60 340,200' ) . attr ( { stroke : '#00ff00' , &quot;stroke-width&quot; : 2 } ); Starting point X Y
  • 48. Curved Paths var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ( 'M100,200 C100,50 350,50 350,200' ) . attr ( { stroke : '#ff0000' , &quot;stroke-width&quot; : 2 } ); paper . path ( 'M110,200 C110,60 340,60 340,200' ) . attr ( { stroke : '#00ff00' , &quot;stroke-width&quot; : 2 } ); Starting point X Y cubic Bézier options Two control points and an end
  • 49.  
  • 50. Text var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ( 'M100,200 C100,50 350,50 350,200' ) . attr ( { stroke : '#ff0000' , &quot;stroke-width&quot; : 2 } ); paper . path ( 'M110,200 C110,60 340,60 340,200' ) . attr ( { stroke : '#00ff00' , &quot;stroke-width&quot; : 2 } ); paper . text ( 225 , 200 , 'Double Rainbow - whoa' );
  • 51.  
  • 52. Control Points? var paper = Raphael ( 'hangman' , 600 , 600 ); paper . path ( 'M100,200 C100,50 350,50 350,200' ) . attr ( { stroke : '#ff0000' , &quot;stroke-width&quot; : 2 } ); paper . path ( 'M110,200 C110,60 340,60 340,200' ) . attr ( { stroke : '#00ff00' , &quot;stroke-width&quot; : 2 } ); These little fuckers
  • 53. Cubic Bézier control points M100,200 C100,50 350,50 350,200
  • 55. Export to SVG <path style=&quot;fill:none&quot; d=&quot; m 26.683,48.446 c 0,0 3.118,-2.598 4.417,-0.39 &quot; />
  • 56. Inkscape or Illustrator Hide your kids, hide your wife
  • 57. On to the live code demo...