SlideShare a Scribd company logo
Scalable Vector Graphics (SVG)
An Introduction
Filip van Laenen
Chief Engineer
Computas
Agenda
• Part I – Introduction
  – What's SVG?
  – Why use SVG?
  – Tools
  – Sample art work
• Part II – Code-along
  – Examples and exercises




                             2
About Me
Filip.van.Laenen@computas.com
          f.a.vanlaenen@ieee.org
                   @filipvanlaenen
My Background
• Java, (Smalltalk)
• (Perl), Ruby
• XML
 – XSLT
 – XSD
 – Namespaces
• HTML
 – CSS



                      4
Introduction to SVG
                  History of SVG
                    What's SVG?
                 Why use SVG?
 Related and Competing Standards
History of SVG
• 1999: Version 1.0
 – PGML (Precision Graphics Markup Language)
 – VML (Vector Markup Language)
• 2001: Version 1.0 recommendation
• 2003: Version 1.1 recommendation
 – SVG Mobile: SVG Basic & SVG Tiny
• 2008: SVG Tiny 1.2 recommendation
• 2011: SVG 1.1 SE recommendation
• Version 1.2 working draft
• SVG 2.0 in progress
                                               6
What's SVG?
• Scalable Vector Graphics
 – Vector based graphics on the net
 – No quality loss after scaling
• XML based
 – Integrates with DOM and XSL
• Animation on every element




                                      7
Why SVG?
• Scaling




            8
Why SVG? (cont'd)
• Smaller files
 – Better compression than JPEG or PNG
 – Even better with SVGZ
• Open standard, part of HTML 5
 – Pure XML
 – Can be read and manipulated by many tools
 – Extensible
• Text based
 – Text manipulation
 – Indexing
                                               9
Why SVG? (cont'd)
• In-line in HTML possible
 – Shared CSS
• Animation and interaction
 – SMIL
 – ECMAScript
 – Other scripting languages




                               10
Why not SVG?
• Take a guess…




                  11
Browser Support for SVG
• Konqueror
• Google Chrome
• Opera
• Safari
• Firefox (since version 4.0)
• Internet Explorer 9




                                12
Related and Competing Standards
• Flash
• VML  †


• XAML   †


• Silverlight (†)


• JPEG
  – Photos
• PNG (GIF )    †

  – Pixel based drawings


                              13
Competing Non-Standards
• Visio diagrammes
• Powerpoint slides




                          14
Creating SVG Files
                Manually
         Programmatically
Manual Production
• Drawing tools
 – Inkscape
   •http://www.inkscape.org/
 – Export from other drawing tools
• Any XML editor
• Any text editor
• Any browser to view/check the result




                                         16
Programmatical Production
• API
 – SVG library based
 – XML
 – Text
• Structure
 – Template based
 – From scratch




                            17
Sample Art Work
Learn More about SVG
• W3C Recommendation
 – http://www.w3.org/TR/SVG/Overview.html
• SVG Basics Tutorial
 – http://www.svgbasics.com/index.html


• Open Clip Art Library
 – http://www.openclipart.org/
• Inkscape
 – http://www.inkscape.org/

                                            23
Questions?
Code-along
Tools
• Text editor
 – (XML editor)
• Browser




                  26
Topics
• Circle, ellipse, rect, opacity, rx, ry
• Line, polygon
• Polyline, path, marker
• Text, tspan
• Stroke
• Linear and radial gradient
• Patterns
• Groups
• Filters
• Animation                                27
Code-along
Part 1 – Circle, ellipse, rect, opacity, rx, ry
Circle
<?xml version="1.0" standalone="no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="150" height="100" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

  <circle cx="100" cy="50" r="40" stroke="black"
     stroke-width="2" fill="red"/>

</svg>



                                                       29
Ellipse
<?xml version="1.0" standalone="no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="150" height="100" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

  <ellipse cx="100" cy="50" rx="40" ry="30"
     stroke="black" stroke-width="2" fill="red"/>

</svg>



                                                       30
Rectangle
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <rect width="300" height="100"
      style="fill:rgb(0,0,255);stroke-width:1;
             stroke:rgb(0,0,0)"/>

</svg>




                                                       31
Opacity
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <rect x="20" y="20" width="250" height="250"
      style="fill:blue;stroke:pink;
             stroke-width:5;
             fill-opacity:0.1;stroke-opacity:0.9"/>

</svg>


                                                       32
Rounded Corners
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <rect x="20" y="20" rx="20" ry="20" width="250"
      height="100"
      style="fill:red;stroke:black;
             stroke-width:5;opacity:0.5"/>

</svg>


                                                       33
Excercise #1
• Yellow circle, green border
• Blue rectangle, 50% opaque
• Red rectangle, rounded corners, black border




                                                 34
Code-along
Part 2 – Line, polygon
Line
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <line x1="0" y1="0" x2="300" y2="300"
      stroke="red" stroke-width="2"/>

</svg>




                                                       36
Polygon
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

  <polygon points="220,100 300,210 170,250"
     fill="#cccccc" stroke="#000000"
     stroke-width="1"/>

</svg>



                                                       37
Excercise #2
• Cumulative diagramme
• X and Y axis
• Blue, yellow and red data




                              38
Code-along
Part 3 – Polyline, path, marker
Polyline
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <polyline
      points="0,0 0,20 20,20 20,40 40,40 40,60"
      fill="none" stroke="red" stroke-width="2"/>

</svg>




                                                       40
Polyline (cont'd)
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <polyline
      points="0,0 0,20 20,20 20,40 40,40 40,60"
      fill="blue" stroke="red" stroke-width="2"/>

</svg>




                                                       41
Path
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="400" height="400" version="1.1"
      xmlns="http://www.w3.org/2000/svg">

   <path d="M250 150 L150 350 L350 350 Z" />

</svg>




                                                       42
Path Commands
• M/m: Moveto
• L/l: Lineto
• H/h: Horizontal lineto
• V/v: Vertical lineto
• C/c: Curveto
• S/s: Smooth curveto
• Q/q: Quadratic Bézier curve
• T/t: Smooth quadratic Bézier curveto
• A/a: Elliptical arc
• Z/z: Closepath                         43
Elliptic Arc
• Rx and ry: radius
• X-axis-rotation: Rotation of the X axis
• Large-arc-flag:
 – 0 if less than 180°
 – 1 if more than 180°
• Sweep-flag:
 – 0 if negative direction
 – 1 if positive direction
• X and y: end points

                                            44
Eliptic Arc (cont'd)
<svg width="700" height="500" version="1.1"
       xmlns="http://www.w3.org/2000/svg">
   <path d="M300 200 A200 150 30 0 0 400 300"
       fill="none" stroke="black" stroke-width="2"/>
   <path d="M300 200 A200 150 30 0 1 400 300"
       fill="none" stroke="red" stroke-width="2"/>
   <path d="M300 200 A200 150 30 1 0 400 300"
       fill="none" stroke="green" stroke-width="2"/>
   <path d="M300 200 A200 150 30 1 1 400 300"
       fill="none" stroke="blue" stroke-width="2"/>
</svg>




                                                       45
Marker
<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
…
    <path d="M 200 250 L 700 100 L 900 350 L 1200 400"
       fill="none" stroke="black" stroke-width="50"
       marker-start="url(#StartMarker)"
       marker-mid="url(#MidMarker)"
       marker-end="url(#EndMarker)"/>
</svg>




                                                    46
Marker Definition
<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
    <defs>
       <marker id="StartMarker" viewBox="0 0 12 12"
         refX="12" refY="6"
         markerWidth="3" markerHeight="3"
         stroke="green" stroke-width="2"
         fill="none" orient="auto">
              <circle cx="6" cy="6" r="5"/>
      </marker>
        …
    </defs>
…
                                                  47
Excercise #3.1
• Same as exercise #2, but line diagramme




                                            48
Excercise #3.2
• Same as exercise #3.1, but with markers




                                            49
Excercise #3.3
• Pie diagramme




                  50
Code-along
 Part 4 – Text, tspan
Text
<svg width="150" height="60" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <text x="10" y="25" fill="navy" font-size="15">
         Lorem ipsum
   </text>
   <text x="10" y="25" dx="5" dy="15" fill="red"
            font-size="18">
         Dolor sit amet
   </text>
</svg>



                                                   52
Tspan
<svg width="150" height="60" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <text x="30" y="25" fill="navy" font-size="15">
         <tspan>
            Lorem ipsum
         </tspan>
         <tspan dx="-50" dy="15" font-style="italic">
            Dolor sit amet
         </tspan>
   </text>
</svg>

                                                   53
Text Style
• Font-family
• Font-size
• Font-style: normal, italic or oblique
• Font-variant: normal, small-caps
• Font-weight: normal, bold, bolder, lighter, …
• Text-anchor: start, middle, end
• Text-decoration: none, underline, overline, …



                                                  54
Excercise #4
• Pie diagramme with labels




                              55
Code-along
   Part 5 – Stroke
Stroke
• Stroke-width
• Stroke-linecap: butt, round, square
• Stroke-linejoin: miter, round, bevel
• Stroke-miterlimit
• Stroke-dasharray
• Stroke-dashoffset
• Stroke-opacity



                                         58
Excercise #5
• Same as exercise #3.1
 – Blue line dashed
 – Red line half transparent




                               59
Code-along
Part 6 – Linear and radial gradients
Linear Gradient
<svg width="600" height="400" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <defs>
         <linearGradient id="MyGradient">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="100%" stop-color="yellow"/>
         </linearGradient>
   </defs>
   <rect x="50" y="50" width="500" height="300"
         fill="url(#MyGradient)" stroke="black"
         stroke-width="2"/>
</svg>
                                                      62
Linear Gradient (cont'd)
<svg width="600" height="400" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <defs>
         <linearGradient id="MyGradient">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="50%" stop-color="yellow"/>
            <stop offset="100%" stop-color="green"/>
         </linearGradient>
   </defs>
   <rect x="50" y="50" width="500" height="300"
         fill="url(#MyGradient)" stroke="black"
         stroke-width="2"/>
</svg>                                                 63
Linear Gradient (cont'd)
<svg width="600" height="400" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <defs>
         <linearGradient id="MyGradient">
            <stop offset="20%" stop-color="orange"/>
            <stop offset="50%" stop-color="yellow"/>
            <stop offset="80%" stop-color="green"/>
         </linearGradient>
   </defs>
   <rect x="50" y="50" width="500" height="300"
         fill="url(#MyGradient)" stroke="black"
         stroke-width="2"/>
</svg>                                                 64
Linear Gradient (cont'd)
<svg width="600" height="400" version="1.1"
      xmlns="http://www.w3.org/2000/svg">
   <defs>
      <linearGradient id="MyGradient"
               x1="0%" y1="0%" x2="100%" y2="100%">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="50%" stop-color="yellow"/>
            <stop offset="100%" stop-color="green"/>
      </linearGradient>
   </defs>



                                                       65
Linear Gradient (cont'd)
<svg width="600" height="400" version="1.1"
      xmlns="http://www.w3.org/2000/svg">
   <defs>
      <linearGradient id="MyGradient"
               x1="0%" y1="0%" x2="100%" y2="50%">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="50%" stop-color="yellow"/>
            <stop offset="100%" stop-color="green"/>
      </linearGradient>
   </defs>



                                                       66
Linear Gradient (cont'd)
<svg width="600" height="400" version="1.1"
      xmlns="http://www.w3.org/2000/svg">
   <defs>
      <linearGradient id="MyGradient"
               x1="0%" y1="0%" x2="100%" y2="50%">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="50%" stop-color="yellow"/>
            <stop offset="100%" stop-color="green"
               stop-opacity=".3"/>
      </linearGradient>
   </defs>

                                                       67
Excercise #6.1
• Same as exercise #2, but with gradients




                                            68
Radial Gradient
<svg width="600" height="400" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <defs>
         <radialGradient id="MyGradient"
               cx="50%" cy="50%" r="50%">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="100%" stop-color="yellow"/>
         </radialGradient>
   </defs>
   <circle cx="300" cy="200" r="180"
stroke="black"
         stroke-width="2" fill="url(#MyGradient)"/>
</svg>                                                69
Radial Gradient (cont'd)
<svg width="600" height="400" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <defs>
         <radialGradient id="MyGradient" cx="50%"
               cy="50%" r="50%" fx="25%" fy="25%">
            <stop offset="0%" stop-color="orange"/>
            <stop offset="100%" stop-color="yellow"/>
         </radialGradient>
   </defs>
   <circle cx="300" cy="200" r="180"
stroke="black"
         stroke-width="2" fill="url(#MyGradient)"/>
</svg>                                                70
Excercise #6.2
• Same as exercise #4, but with gradients
 – Use gradientUnits="userSpaceOnUse"




                                            71
Just Mentioning
    Patterns and Groups
Patterns




           73
Groups
• Logical unit
• Common attributes
 – Color
 – Opacity
 – Fill, stroke, gradients
• Attributes can be overriden a lower level




                                              74
Code-Along
   Part 7 – Filters
Filters
• Primitives
 – Lighting
 – Blur
 – Color tranformations
 – Displacement
 – Turbulence
• Filter mathematics
 – Composition
 – Blending
 – Addition
                          76
Filter
<svg width="600" height="400" version="1.1"
         xmlns="http://www.w3.org/2000/svg">
   <filter id="f1" width="150%" height="150%">
         <feOffset result="offOut" in="SourceGraphic"
            dx="10" dy="10"/>
         <feBlend in="SourceGraphic" in2="offOut"
            mode="normal"/>
   </filter>
   <rect filter="url(#f1)" x="40" y="40"
         rx="40" ry="40" width="400" height="200"
         style="fill:red;stroke:black;
            stroke-width:5;opacity:0.5"/>
</svg>                                              77
Filter (cont'd)
  <filter id="f2" width="150%" height="150%">
     <feOffset result="offOut" in="SourceGraphic"
        dx="10" dy="10"/>
     <feGaussianBlur result="blurOut" in="offOut"
        stdDeviation="5"/>
     <feBlend in="SourceGraphic" in2="blurOut"
        mode="normal"/>
  </filter>




                                                 78
Filter Sources
• Result from another filter
• SourceGraphic
• SourceAlpha
• BackgroundImage
• BackgroundAlpha
• FillPaint
• StrokePaint



                               79
Filter (cont'd)
  <filter id="f3" width="150%" height="150%">
     <feOffset result="offOut" in="SourceAlpha"
        dx="10" dy="10"/>
     <feGaussianBlur result="blurOut" in="offOut"
        stdDeviation="5"/>
     <feBlend in="SourceGraphic" in2="blurOut"
        mode="normal"/>
  </filter>




                                                  80
Filter (cont'd)
  <filter id="f4" width="150%" height="150%">
     <feOffset result="offOut" in="SourceGraphic"
        dx="10" dy="10"/>
     <feColorMatrix result="matrixOut" in="offOut"
        type="matrix"
        values="0.2 0 0 0 0
                0 0.2 0 0 0
                0 0 0.2 0 0
                0 0 0 1 0"/>
     <feGaussianBlur result="blurOut"
        in="matrixOut" stdDeviation="5"/>
     <feBlend in="SourceGraphic" in2="blurOut"
        mode="normal"/>
  </filter>                                          81
Color Transformations
• Matrix:
 – Transformation per color channel (r, g, b and α)
 – 0 is black (no color)




• Alternatives:
 – Saturate, HueRotate, LuminanceToAlpha
                                                      82
Code-Along
 Part 8 – Animation
Animation
• Animation elements
• Scripting
 – ECMAScript a.o.
• SMIL
 – Synchronized Multimedia Integration Language




                                                  84
Animate
<circle cx="100" cy="50" stroke="green"
      stroke-width="2" fill="yellow">
   <animate attributeName="r" attributeType="XML"
      begin="0s" dur="9s" from="20" to="60"
      fill="freeze"/>
</circle>
<rect x="20" y="30" width="200" height="100"
      fill="blue" opacity="0.5">
   <animate attributeName="opacity"
      attributeType="XML" begin="0s" dur="9s"
      fill="remove" from="0.2" to="1"/>
</rect>
                                                    85
AnimateTransform
<rect x="20" y="30" width="200" height="100"
      fill="blue">
   <animateTransform attributeName="transform"
      attributeType="XML" type="scale"
      from="1" to="2" dur="5s" fill="freeze"/>
</rect>
<rect x="10" y="70" width="100" height="100"
      fill="red">
   <animateTransform attributeName="transform"
      attributeType="XML" type="rotate"
      from="0" to="360" dur="5s"
      repeatCount="indefinite"/>
</rect>                                          86
OnClick
<rect x="10" y="70" width="100" height="100"
     fill="red"
     onclick="evt.target.setAttribute('fill','green')"
/>




                                                         87
OnLoad
<svg … onload="StartAnimation(evt)">
  <script type="application/ecmascript"><![CDATA[
     …
     function StartAnimation(evt) {
         blue_rect =
evt.target.ownerDocument.getElementById("BlueRect");
         blue_rect.setAttribute("transform",
           "scale(" + scalefactor + ")");
     …
     }
  ]]></script>
  <rect id="BlueRect" x="20" y="30"
     width="20" height="10" fill="blue"/>

                                                       88
Topics Not Covered
Topics Not Covered
• Transform and viewBox
• Clipping, masking and compositing
• Fonts
• Glyphs
• Linking
• Metadata
• Extensibility



                                      90
Learn More about SVG
• W3C Recommendation
 – http://www.w3.org/TR/SVG/Overview.html
• SVG Basics Tutorial
 – http://www.svgbasics.com/index.html


• Open Clip Art Library
 – http://www.openclipart.org/
• Inkscape
 – http://www.inkscape.org/

                                            91
Questions?
           Comments?
Filip.van.Laenen@computas.com
          f.a.vanlaenen@ieee.org
                   @filipvanlaenen
Thanks!
Filip.van.Laenen@computas.com
          f.a.vanlaenen@ieee.org
                   @filipvanlaenen

More Related Content

Viewers also liked

Professional reports with SVG
Professional reports with SVGProfessional reports with SVG
Professional reports with SVGSpeedPartner GmbH
 
Setting the Stage for SVG Animation
Setting the Stage for SVG AnimationSetting the Stage for SVG Animation
Setting the Stage for SVG AnimationJames Nowland
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes BackMatt Baxter
 
Use SVG to Bring the Web to Life (Quinton Jason Jr)
Use SVG to Bring the Web to Life (Quinton Jason Jr)Use SVG to Bring the Web to Life (Quinton Jason Jr)
Use SVG to Bring the Web to Life (Quinton Jason Jr)Future Insights
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesMario Heiderich
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersOswald Campesato
 
Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Pascal Rettig
 
How i learned to stop using icon fonts and love svg (again)
How i learned to stop using icon fonts and love svg (again)How i learned to stop using icon fonts and love svg (again)
How i learned to stop using icon fonts and love svg (again)sarah semark
 
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...Förderverein Technische Fakultät
 
Streaming of SVG animations on the Web
Streaming of SVG animations on the WebStreaming of SVG animations on the Web
Streaming of SVG animations on the WebCyril Concolato
 
Dynamic Visuals with SVG
Dynamic Visuals with SVGDynamic Visuals with SVG
Dynamic Visuals with SVGJames Bryant
 

Viewers also liked (12)

Professional reports with SVG
Professional reports with SVGProfessional reports with SVG
Professional reports with SVG
 
Setting the Stage for SVG Animation
Setting the Stage for SVG AnimationSetting the Stage for SVG Animation
Setting the Stage for SVG Animation
 
SVG Strikes Back
SVG Strikes BackSVG Strikes Back
SVG Strikes Back
 
Use SVG to Bring the Web to Life (Quinton Jason Jr)
Use SVG to Bring the Web to Life (Quinton Jason Jr)Use SVG to Bring the Web to Life (Quinton Jason Jr)
Use SVG to Bring the Web to Life (Quinton Jason Jr)
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
 
Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3Vector Graphics on the Web: SVG, Canvas, CSS3
Vector Graphics on the Web: SVG, Canvas, CSS3
 
How i learned to stop using icon fonts and love svg (again)
How i learned to stop using icon fonts and love svg (again)How i learned to stop using icon fonts and love svg (again)
How i learned to stop using icon fonts and love svg (again)
 
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
Latest Developments of Scalable Vector Graphics (SVG) 2, With a Focus on Stre...
 
Streaming of SVG animations on the Web
Streaming of SVG animations on the WebStreaming of SVG animations on the Web
Streaming of SVG animations on the Web
 
Dynamic Visuals with SVG
Dynamic Visuals with SVGDynamic Visuals with SVG
Dynamic Visuals with SVG
 
SVG overview
SVG overviewSVG overview
SVG overview
 

Similar to SVG (Devoxx 2011, 2011-NOV-14)

Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?Mike Wilcox
 
MOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize thisMOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize thisBoris Zapolsky
 
Biological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJSBiological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJSGil Fink
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebCloudinary
 
Using SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better PlaceUsing SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better PlacePatrick Hund
 
SVG - Scalable Vector Graphics
SVG - Scalable Vector GraphicsSVG - Scalable Vector Graphics
SVG - Scalable Vector GraphicsShweta Sadawarte
 
Biological modeling, powered by angular js
Biological modeling, powered by angular jsBiological modeling, powered by angular js
Biological modeling, powered by angular jsGil Fink
 
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...Guillaume Kossi
 
Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!Gill Cleeren
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bendRaj Lal
 
SVG vs Canvas - Showdown of the Painters
SVG vs Canvas - Showdown of the PaintersSVG vs Canvas - Showdown of the Painters
SVG vs Canvas - Showdown of the PaintersPhil Reither
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3Helder da Rocha
 
Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)OlesiaJL
 

Similar to SVG (Devoxx 2011, 2011-NOV-14) (20)

Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 
MOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize thisMOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize this
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
SVG and the web
SVG and the webSVG and the web
SVG and the web
 
Biological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJSBiological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJS
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
Using SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better PlaceUsing SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better Place
 
D3.js and SVG
D3.js and SVGD3.js and SVG
D3.js and SVG
 
SVG - Scalable Vector Graphics
SVG - Scalable Vector GraphicsSVG - Scalable Vector Graphics
SVG - Scalable Vector Graphics
 
SVGD3Angular2React
SVGD3Angular2ReactSVGD3Angular2React
SVGD3Angular2React
 
Biological modeling, powered by angular js
Biological modeling, powered by angular jsBiological modeling, powered by angular js
Biological modeling, powered by angular js
 
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
Sara Soueidan: Styling and Animating Scalable Vector Graphics with CSS [CSSCo...
 
Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!Comparing XAML and HTML: FIGHT!
Comparing XAML and HTML: FIGHT!
 
Html5 Whats around the bend
Html5 Whats around the bendHtml5 Whats around the bend
Html5 Whats around the bend
 
SVG vs Canvas - Showdown of the Painters
SVG vs Canvas - Showdown of the PaintersSVG vs Canvas - Showdown of the Painters
SVG vs Canvas - Showdown of the Painters
 
JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3JavaONE 2012 Using Java with HTML5 and CSS3
JavaONE 2012 Using Java with HTML5 and CSS3
 
Web Vector Graphics
Web Vector GraphicsWeb Vector Graphics
Web Vector Graphics
 
Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)Фабрика "Blockly" (исправлено)
Фабрика "Blockly" (исправлено)
 
RaphaëlJS magic
RaphaëlJS magicRaphaëlJS magic
RaphaëlJS magic
 
Svcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobileSvcc 2013-css3-and-mobile
Svcc 2013-css3-and-mobile
 

More from Filip Van Laenen

How JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterHow JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterFilip Van Laenen
 
How JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterHow JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterFilip Van Laenen
 
Clouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesClouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesFilip Van Laenen
 
Become an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectBecome an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectFilip Van Laenen
 
Mutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeMutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeFilip Van Laenen
 
Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Filip Van Laenen
 
Five Inconvenient Truths about REST
Five Inconvenient Truths about RESTFive Inconvenient Truths about REST
Five Inconvenient Truths about RESTFilip Van Laenen
 
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...Filip Van Laenen
 
Oop 2015 – Mutation Testing
Oop 2015 – Mutation TestingOop 2015 – Mutation Testing
Oop 2015 – Mutation TestingFilip Van Laenen
 
#NoEstimates – Smidig 2014
 #NoEstimates – Smidig 2014 #NoEstimates – Smidig 2014
#NoEstimates – Smidig 2014Filip Van Laenen
 
#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014Filip Van Laenen
 
Tre ubeleilige sannheter om REST
Tre ubeleilige sannheter om RESTTre ubeleilige sannheter om REST
Tre ubeleilige sannheter om RESTFilip Van Laenen
 
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Filip Van Laenen
 
Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Filip Van Laenen
 
Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Filip Van Laenen
 

More from Filip Van Laenen (18)

Drawing for IT Architects
Drawing for IT ArchitectsDrawing for IT Architects
Drawing for IT Architects
 
How JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate OrbiterHow JSR 385 could have saved the Mars Climate Orbiter
How JSR 385 could have saved the Mars Climate Orbiter
 
How JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate OrbiterHow JSR-385 Could Have Saved the Mars Climate Orbiter
How JSR-385 Could Have Saved the Mars Climate Orbiter
 
Clouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp EdgesClouds with Trenches and Sharp Edges
Clouds with Trenches and Sharp Edges
 
Become an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint ArchitectBecome an SVG Architect, not a PowerPoint Architect
Become an SVG Architect, not a PowerPoint Architect
 
Dial M for Mutation
Dial M for MutationDial M for Mutation
Dial M for Mutation
 
Mutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kodeMutasjonstesting – Lag bugs for å få bedre kode
Mutasjonstesting – Lag bugs for å få bedre kode
 
Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?Hvem kommer til å vinne kommunevalget?
Hvem kommer til å vinne kommunevalget?
 
Five Inconvenient Truths about REST
Five Inconvenient Truths about RESTFive Inconvenient Truths about REST
Five Inconvenient Truths about REST
 
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
How Free Data Can Drive Some of the Monkey Business Out of Political Journali...
 
Oop 2015 – Mutation Testing
Oop 2015 – Mutation TestingOop 2015 – Mutation Testing
Oop 2015 – Mutation Testing
 
#NoEstimates – Smidig 2014
 #NoEstimates – Smidig 2014 #NoEstimates – Smidig 2014
#NoEstimates – Smidig 2014
 
#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014#NoEstimates – Javazone 2014
#NoEstimates – Javazone 2014
 
Tre ubeleilige sannheter om REST
Tre ubeleilige sannheter om RESTTre ubeleilige sannheter om REST
Tre ubeleilige sannheter om REST
 
What Architects Really Do
What Architects Really DoWhat Architects Really Do
What Architects Really Do
 
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
 
Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?Hvorfor stole på e-valg 2011/13?
Hvorfor stole på e-valg 2011/13?
 
Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)Mutation testing (OOP 2012, 2012-JAN-24)
Mutation testing (OOP 2012, 2012-JAN-24)
 

Recently uploaded

What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 

SVG (Devoxx 2011, 2011-NOV-14)

  • 1. Scalable Vector Graphics (SVG) An Introduction Filip van Laenen Chief Engineer Computas
  • 2. Agenda • Part I – Introduction – What's SVG? – Why use SVG? – Tools – Sample art work • Part II – Code-along – Examples and exercises 2
  • 3. About Me Filip.van.Laenen@computas.com f.a.vanlaenen@ieee.org @filipvanlaenen
  • 4. My Background • Java, (Smalltalk) • (Perl), Ruby • XML – XSLT – XSD – Namespaces • HTML – CSS 4
  • 5. Introduction to SVG History of SVG What's SVG? Why use SVG? Related and Competing Standards
  • 6. History of SVG • 1999: Version 1.0 – PGML (Precision Graphics Markup Language) – VML (Vector Markup Language) • 2001: Version 1.0 recommendation • 2003: Version 1.1 recommendation – SVG Mobile: SVG Basic & SVG Tiny • 2008: SVG Tiny 1.2 recommendation • 2011: SVG 1.1 SE recommendation • Version 1.2 working draft • SVG 2.0 in progress 6
  • 7. What's SVG? • Scalable Vector Graphics – Vector based graphics on the net – No quality loss after scaling • XML based – Integrates with DOM and XSL • Animation on every element 7
  • 9. Why SVG? (cont'd) • Smaller files – Better compression than JPEG or PNG – Even better with SVGZ • Open standard, part of HTML 5 – Pure XML – Can be read and manipulated by many tools – Extensible • Text based – Text manipulation – Indexing 9
  • 10. Why SVG? (cont'd) • In-line in HTML possible – Shared CSS • Animation and interaction – SMIL – ECMAScript – Other scripting languages 10
  • 11. Why not SVG? • Take a guess… 11
  • 12. Browser Support for SVG • Konqueror • Google Chrome • Opera • Safari • Firefox (since version 4.0) • Internet Explorer 9 12
  • 13. Related and Competing Standards • Flash • VML † • XAML † • Silverlight (†) • JPEG – Photos • PNG (GIF ) † – Pixel based drawings 13
  • 14. Competing Non-Standards • Visio diagrammes • Powerpoint slides 14
  • 15. Creating SVG Files Manually Programmatically
  • 16. Manual Production • Drawing tools – Inkscape •http://www.inkscape.org/ – Export from other drawing tools • Any XML editor • Any text editor • Any browser to view/check the result 16
  • 17. Programmatical Production • API – SVG library based – XML – Text • Structure – Template based – From scratch 17
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. Learn More about SVG • W3C Recommendation – http://www.w3.org/TR/SVG/Overview.html • SVG Basics Tutorial – http://www.svgbasics.com/index.html • Open Clip Art Library – http://www.openclipart.org/ • Inkscape – http://www.inkscape.org/ 23
  • 26. Tools • Text editor – (XML editor) • Browser 26
  • 27. Topics • Circle, ellipse, rect, opacity, rx, ry • Line, polygon • Polyline, path, marker • Text, tspan • Stroke • Linear and radial gradient • Patterns • Groups • Filters • Animation 27
  • 28. Code-along Part 1 – Circle, ellipse, rect, opacity, rx, ry
  • 29. Circle <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="150" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/> </svg> 29
  • 30. Ellipse <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="150" height="100" version="1.1" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="100" cy="50" rx="40" ry="30" stroke="black" stroke-width="2" fill="red"/> </svg> 30
  • 31. Rectangle <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)"/> </svg> 31
  • 32. Opacity <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="250" height="250" style="fill:blue;stroke:pink; stroke-width:5; fill-opacity:0.1;stroke-opacity:0.9"/> </svg> 32
  • 33. Rounded Corners <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" rx="20" ry="20" width="250" height="100" style="fill:red;stroke:black; stroke-width:5;opacity:0.5"/> </svg> 33
  • 34. Excercise #1 • Yellow circle, green border • Blue rectangle, 50% opaque • Red rectangle, rounded corners, black border 34
  • 35. Code-along Part 2 – Line, polygon
  • 36. Line <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <line x1="0" y1="0" x2="300" y2="300" stroke="red" stroke-width="2"/> </svg> 36
  • 37. Polygon <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <polygon points="220,100 300,210 170,250" fill="#cccccc" stroke="#000000" stroke-width="1"/> </svg> 37
  • 38. Excercise #2 • Cumulative diagramme • X and Y axis • Blue, yellow and red data 38
  • 39. Code-along Part 3 – Polyline, path, marker
  • 40. Polyline <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <polyline points="0,0 0,20 20,20 20,40 40,40 40,60" fill="none" stroke="red" stroke-width="2"/> </svg> 40
  • 41. Polyline (cont'd) <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <polyline points="0,0 0,20 20,20 20,40 40,40 40,60" fill="blue" stroke="red" stroke-width="2"/> </svg> 41
  • 42. Path <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="400" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="M250 150 L150 350 L350 350 Z" /> </svg> 42
  • 43. Path Commands • M/m: Moveto • L/l: Lineto • H/h: Horizontal lineto • V/v: Vertical lineto • C/c: Curveto • S/s: Smooth curveto • Q/q: Quadratic Bézier curve • T/t: Smooth quadratic Bézier curveto • A/a: Elliptical arc • Z/z: Closepath 43
  • 44. Elliptic Arc • Rx and ry: radius • X-axis-rotation: Rotation of the X axis • Large-arc-flag: – 0 if less than 180° – 1 if more than 180° • Sweep-flag: – 0 if negative direction – 1 if positive direction • X and y: end points 44
  • 45. Eliptic Arc (cont'd) <svg width="700" height="500" version="1.1" xmlns="http://www.w3.org/2000/svg"> <path d="M300 200 A200 150 30 0 0 400 300" fill="none" stroke="black" stroke-width="2"/> <path d="M300 200 A200 150 30 0 1 400 300" fill="none" stroke="red" stroke-width="2"/> <path d="M300 200 A200 150 30 1 0 400 300" fill="none" stroke="green" stroke-width="2"/> <path d="M300 200 A200 150 30 1 1 400 300" fill="none" stroke="blue" stroke-width="2"/> </svg> 45
  • 46. Marker <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> … <path d="M 200 250 L 700 100 L 900 350 L 1200 400" fill="none" stroke="black" stroke-width="50" marker-start="url(#StartMarker)" marker-mid="url(#MidMarker)" marker-end="url(#EndMarker)"/> </svg> 46
  • 47. Marker Definition <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <marker id="StartMarker" viewBox="0 0 12 12" refX="12" refY="6" markerWidth="3" markerHeight="3" stroke="green" stroke-width="2" fill="none" orient="auto"> <circle cx="6" cy="6" r="5"/> </marker> … </defs> … 47
  • 48. Excercise #3.1 • Same as exercise #2, but line diagramme 48
  • 49. Excercise #3.2 • Same as exercise #3.1, but with markers 49
  • 50. Excercise #3.3 • Pie diagramme 50
  • 51. Code-along Part 4 – Text, tspan
  • 52. Text <svg width="150" height="60" version="1.1" xmlns="http://www.w3.org/2000/svg"> <text x="10" y="25" fill="navy" font-size="15"> Lorem ipsum </text> <text x="10" y="25" dx="5" dy="15" fill="red" font-size="18"> Dolor sit amet </text> </svg> 52
  • 53. Tspan <svg width="150" height="60" version="1.1" xmlns="http://www.w3.org/2000/svg"> <text x="30" y="25" fill="navy" font-size="15"> <tspan> Lorem ipsum </tspan> <tspan dx="-50" dy="15" font-style="italic"> Dolor sit amet </tspan> </text> </svg> 53
  • 54. Text Style • Font-family • Font-size • Font-style: normal, italic or oblique • Font-variant: normal, small-caps • Font-weight: normal, bold, bolder, lighter, … • Text-anchor: start, middle, end • Text-decoration: none, underline, overline, … 54
  • 55. Excercise #4 • Pie diagramme with labels 55
  • 56.
  • 57. Code-along Part 5 – Stroke
  • 58. Stroke • Stroke-width • Stroke-linecap: butt, round, square • Stroke-linejoin: miter, round, bevel • Stroke-miterlimit • Stroke-dasharray • Stroke-dashoffset • Stroke-opacity 58
  • 59. Excercise #5 • Same as exercise #3.1 – Blue line dashed – Red line half transparent 59
  • 60.
  • 61. Code-along Part 6 – Linear and radial gradients
  • 62. Linear Gradient <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="MyGradient"> <stop offset="0%" stop-color="orange"/> <stop offset="100%" stop-color="yellow"/> </linearGradient> </defs> <rect x="50" y="50" width="500" height="300" fill="url(#MyGradient)" stroke="black" stroke-width="2"/> </svg> 62
  • 63. Linear Gradient (cont'd) <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="MyGradient"> <stop offset="0%" stop-color="orange"/> <stop offset="50%" stop-color="yellow"/> <stop offset="100%" stop-color="green"/> </linearGradient> </defs> <rect x="50" y="50" width="500" height="300" fill="url(#MyGradient)" stroke="black" stroke-width="2"/> </svg> 63
  • 64. Linear Gradient (cont'd) <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="MyGradient"> <stop offset="20%" stop-color="orange"/> <stop offset="50%" stop-color="yellow"/> <stop offset="80%" stop-color="green"/> </linearGradient> </defs> <rect x="50" y="50" width="500" height="300" fill="url(#MyGradient)" stroke="black" stroke-width="2"/> </svg> 64
  • 65. Linear Gradient (cont'd) <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="MyGradient" x1="0%" y1="0%" x2="100%" y2="100%"> <stop offset="0%" stop-color="orange"/> <stop offset="50%" stop-color="yellow"/> <stop offset="100%" stop-color="green"/> </linearGradient> </defs> 65
  • 66. Linear Gradient (cont'd) <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="MyGradient" x1="0%" y1="0%" x2="100%" y2="50%"> <stop offset="0%" stop-color="orange"/> <stop offset="50%" stop-color="yellow"/> <stop offset="100%" stop-color="green"/> </linearGradient> </defs> 66
  • 67. Linear Gradient (cont'd) <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="MyGradient" x1="0%" y1="0%" x2="100%" y2="50%"> <stop offset="0%" stop-color="orange"/> <stop offset="50%" stop-color="yellow"/> <stop offset="100%" stop-color="green" stop-opacity=".3"/> </linearGradient> </defs> 67
  • 68. Excercise #6.1 • Same as exercise #2, but with gradients 68
  • 69. Radial Gradient <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <radialGradient id="MyGradient" cx="50%" cy="50%" r="50%"> <stop offset="0%" stop-color="orange"/> <stop offset="100%" stop-color="yellow"/> </radialGradient> </defs> <circle cx="300" cy="200" r="180" stroke="black" stroke-width="2" fill="url(#MyGradient)"/> </svg> 69
  • 70. Radial Gradient (cont'd) <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <radialGradient id="MyGradient" cx="50%" cy="50%" r="50%" fx="25%" fy="25%"> <stop offset="0%" stop-color="orange"/> <stop offset="100%" stop-color="yellow"/> </radialGradient> </defs> <circle cx="300" cy="200" r="180" stroke="black" stroke-width="2" fill="url(#MyGradient)"/> </svg> 70
  • 71. Excercise #6.2 • Same as exercise #4, but with gradients – Use gradientUnits="userSpaceOnUse" 71
  • 72. Just Mentioning Patterns and Groups
  • 73. Patterns 73
  • 74. Groups • Logical unit • Common attributes – Color – Opacity – Fill, stroke, gradients • Attributes can be overriden a lower level 74
  • 75. Code-Along Part 7 – Filters
  • 76. Filters • Primitives – Lighting – Blur – Color tranformations – Displacement – Turbulence • Filter mathematics – Composition – Blending – Addition 76
  • 77. Filter <svg width="600" height="400" version="1.1" xmlns="http://www.w3.org/2000/svg"> <filter id="f1" width="150%" height="150%"> <feOffset result="offOut" in="SourceGraphic" dx="10" dy="10"/> <feBlend in="SourceGraphic" in2="offOut" mode="normal"/> </filter> <rect filter="url(#f1)" x="40" y="40" rx="40" ry="40" width="400" height="200" style="fill:red;stroke:black; stroke-width:5;opacity:0.5"/> </svg> 77
  • 78. Filter (cont'd) <filter id="f2" width="150%" height="150%"> <feOffset result="offOut" in="SourceGraphic" dx="10" dy="10"/> <feGaussianBlur result="blurOut" in="offOut" stdDeviation="5"/> <feBlend in="SourceGraphic" in2="blurOut" mode="normal"/> </filter> 78
  • 79. Filter Sources • Result from another filter • SourceGraphic • SourceAlpha • BackgroundImage • BackgroundAlpha • FillPaint • StrokePaint 79
  • 80. Filter (cont'd) <filter id="f3" width="150%" height="150%"> <feOffset result="offOut" in="SourceAlpha" dx="10" dy="10"/> <feGaussianBlur result="blurOut" in="offOut" stdDeviation="5"/> <feBlend in="SourceGraphic" in2="blurOut" mode="normal"/> </filter> 80
  • 81. Filter (cont'd) <filter id="f4" width="150%" height="150%"> <feOffset result="offOut" in="SourceGraphic" dx="10" dy="10"/> <feColorMatrix result="matrixOut" in="offOut" type="matrix" values="0.2 0 0 0 0 0 0.2 0 0 0 0 0 0.2 0 0 0 0 0 1 0"/> <feGaussianBlur result="blurOut" in="matrixOut" stdDeviation="5"/> <feBlend in="SourceGraphic" in2="blurOut" mode="normal"/> </filter> 81
  • 82. Color Transformations • Matrix: – Transformation per color channel (r, g, b and α) – 0 is black (no color) • Alternatives: – Saturate, HueRotate, LuminanceToAlpha 82
  • 83. Code-Along Part 8 – Animation
  • 84. Animation • Animation elements • Scripting – ECMAScript a.o. • SMIL – Synchronized Multimedia Integration Language 84
  • 85. Animate <circle cx="100" cy="50" stroke="green" stroke-width="2" fill="yellow"> <animate attributeName="r" attributeType="XML" begin="0s" dur="9s" from="20" to="60" fill="freeze"/> </circle> <rect x="20" y="30" width="200" height="100" fill="blue" opacity="0.5"> <animate attributeName="opacity" attributeType="XML" begin="0s" dur="9s" fill="remove" from="0.2" to="1"/> </rect> 85
  • 86. AnimateTransform <rect x="20" y="30" width="200" height="100" fill="blue"> <animateTransform attributeName="transform" attributeType="XML" type="scale" from="1" to="2" dur="5s" fill="freeze"/> </rect> <rect x="10" y="70" width="100" height="100" fill="red"> <animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0" to="360" dur="5s" repeatCount="indefinite"/> </rect> 86
  • 87. OnClick <rect x="10" y="70" width="100" height="100" fill="red" onclick="evt.target.setAttribute('fill','green')" /> 87
  • 88. OnLoad <svg … onload="StartAnimation(evt)"> <script type="application/ecmascript"><![CDATA[ … function StartAnimation(evt) { blue_rect = evt.target.ownerDocument.getElementById("BlueRect"); blue_rect.setAttribute("transform", "scale(" + scalefactor + ")"); … } ]]></script> <rect id="BlueRect" x="20" y="30" width="20" height="10" fill="blue"/> 88
  • 90. Topics Not Covered • Transform and viewBox • Clipping, masking and compositing • Fonts • Glyphs • Linking • Metadata • Extensibility 90
  • 91. Learn More about SVG • W3C Recommendation – http://www.w3.org/TR/SVG/Overview.html • SVG Basics Tutorial – http://www.svgbasics.com/index.html • Open Clip Art Library – http://www.openclipart.org/ • Inkscape – http://www.inkscape.org/ 91
  • 92. Questions? Comments? Filip.van.Laenen@computas.com f.a.vanlaenen@ieee.org @filipvanlaenen
  • 93. Thanks! Filip.van.Laenen@computas.com f.a.vanlaenen@ieee.org @filipvanlaenen