ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
? SitePen, Inc. All Rights Reserved
A Journey Through Web
Vector Graphics
Dylan Schiemann (@dylans)
SitePen, Inc.
London Ajax, October 12, 2010
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
ajax bsd ceo comet cometdaily conferences
cynic dojodylan@dylans hiring
javascript open source schiemann
sitepentoolkit travel web www
dylan
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Topology and Rheology of Quasi Two-Dimensional Foam
1996
http://arxiv.org/pdf/cond-mat/9904101
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Netscape 2-4: JavaScript, but no drawing
I didn't like Java or Flash
1996-1999
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Adobe SVGViewer
2000-2001
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
SFW Accendo
(NetWindows, SVGViewer, custom JS code)
2003
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
2004
SVG Viewer dead, except in Adobe Acrobat
Adobe acquired an obscure vector graphics format
Preventing the death of SVG
http://dylanschiemann.com/2004/09/12/preventing-the-death-
of-svg/
Dojo Toolkit development started
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
2005
Dojo 0.1 and 0.2
SVG Viewer
Not ideal
Mozilla
SVG through special builds
"One of the very ?rst design decisions of which I was a
proponent was that the Dojo Toolkit not be HTML-centric.
After working on several SVG-based intranet applications, I
was highly motivated to see Dojo work well with SVG and
other namespaces that could become relevant in the future."
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
2006
"Before this project is launched, dojo¡¯s developers have
made signi?cant progress to explore how to integrate SVG
support. Another candidate for the back-end render engine
is VML. There are two projects in dojo SoC 2006, dojo-svg &
dojo-vml, a universal interface is developed to glue the Gfx
API and various back-end rendering engine. I prefer dojo-
svg, since VML is only rendered within Microsoft Internet
Explorer, while SVG is supported natively by Mozilla Firefox
1.5+, or any browsers with Adobe SVG plugin." - Kun Xi
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
dojox.gfx (Thanks in part to Mozilla!)
Bubbles, 10 years later! (Thanks Gavin Doughtie)
SVG andVML support
http://thinkvitamin.com/code/create-cross-browser-vector-graphics/
2006
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
2007-2010
Add support for <canvas>, Silverlight, SVGWeb
Base vector graphics APIs
Charting & real-time capabilities
Data store bindings
Drawing APIs
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
What is DojoX GFX?
JavaScript cross-browser graphics package
Support for SVG, Canvas, VML, Silverlight, and SVGWeb
Loosely based on SVG vocabulary
Geometry, shapes, transformation matrices
Stroke, ?ll, fonts, other visuals
Surfaces and groups
Interactive (events)
Optional SVG to JSON converter
Send user-created drawings to the server
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
dojox.gfx
DojoX Drawing
Normalized API
VMLSVG
Canvas Silverlight
DojoX Charting
SVGWeb
Render
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Create
dojox.gfx.createSurface(node, width, height)
All drawing operations done through the surface object
Multiple surfaces in a document supported
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Draw
Several shape primitives to choose from
Path, Polyline, Rect, Ellipse, Circle, Line
surface.create<shape>(params);
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Style
<shape>.setFill to ?ll the object
<shape>.setStroke to outline the object (think CSS border)
?ll with gradients
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Transform
Common transformations available through
dojox.gfx.matrix
?ipX, ?ipY, ?ipXY, translate, scale, rotate/rotateg
skewX, skewY, re?ect, project
shape.setTransform(dojox.gfx.matrix.?ipX);
shape.applyTransform(dojox.gfx.matrix.translate(10,10));
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Group
dojox.gfx.VirtualGroup used to group shapes together
can be treated as a single unit
var g= surface.createGroup();
g.add(shape);
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Event
Using <shape>.getEventSource() to get a direct handle to
underlying nodes
"Old school" event handling functions expect a normalized
event object
Connect handlers to event sources:
dojo.connect(shape.getEventSource(),¡°onmousedown¡±,
onMouseDown);
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Example
Fun with the London Ajax logo
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
DojoX Charting Library
Dojo¡¯s primary charting library is within DojoX
Can use DojoX¡¯s gfx library to create animated e?ects
Dozens of themes included, supports custom theming and
gradation themes
Zooming, panning, and scrolling capabilities
Supports chart events
Support for SVG, VML, Canvas, Silverlight, and other technologies
Support for 2D and 3D charts
Integration with Dojo data stores
Turns boring, static data into something readable and visually
appealing.
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Chart Types
Line Charts
Stacked Line Charts
Bar Charts
Column Charts
Pie Charts
Scatter Charts
Grids
Charts can be created declaratively or programmatically.
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Chart Pieces
¡°Chart¡±- the object which will house the other pieces of the
chart
Theme - the series of colors and/or gradation information for
the chart¡¯s pieces, lines, and markers
Plots - describe how data is to be visualized
Axes - the dimensions of data that are being visualized and
includes things like specifying labels
Series - describes the Data itself that the chart will visualize
Markers - shapes placed at key points within data
Extras - additional¡°plugin¡±functionalities for the chart
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Chart Plugins and E?ects
Tooltip - Shows a tooltip when a chart piece is hovered over
Highlight - A hover color e?ect when hovering over a chart
piece
Magnify - Magni?es a marker when hovered over
MoveSlice - Animates a pie slice when hovered over
Shake - Shakes a given chart piece when hovered over
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
<script>
//require appropriate charting classes
dojo.require(¡°dojox.charting.widget.Chart2D¡±);
dojo.require(¡°dojox.charting.themes.PlotKit.green¡±);
//sample data
pieData = [{ x:0, y:9420 }, { x:1, y:10126 }, { x:2, y:10000 }];
</script>
//create a pie chart declaratively
<div dojoType="dojox.charting.widget.Chart2D" id="viewsChart"
theme="dojox.charting.themes.PlotKit.green" style="width: 550px;
height: 550px;">
! <div class="plot" name="default" type="Pie" radius="200"
fontColor="black" labelOffset="-20"></div>
! <div class="series" name="January" array="pieData"></div>
! <div class="action" type="Tooltip"></div>
! <div class="action" type="MoveSlice" shift="2"></div>
</div>
Create a Basic Pie Chart - Declaratively
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Create a Basic Pie Chart - Declaratively
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Basic Chart Theme Creation (cont.)
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
<script type="text/javascript">
//require appropriate charting classes
dojo.require(¡°dojox.charting.widget.Chart2D¡±);
dojo.require(¡°dojox.charting.themes.Tom¡±);
//sample data
pieData = [{ x:0,y:9420 },{ x:1,y:10126 },{ x:2,y:10000 }];
dojo.ready(function() {
! var BarChart = new dojox.charting.Chart2D("BarChart");
! BarChart.setTheme(dojox.charting.themes.Tom);
! BarChart.addAxis("x",{fixUpper: "major",includeZero:
false,max:10});
! BarChart.addAxis("y",{vertical: true,fixLower:
"major",fixUpper: "major"});
! BarChart.addPlot("default",{type: "Columns",gap:5});
! //add a series of data to the chart
! BarChart.addSeries("My Chart Info",pieData,{});
! BarChart.render();
});
</script>
<div id="BarChart" style="width:500px;height:300px;"></div>
Create a Basic Column Chart - Programatically
Saturday, October 16, 2010
? SitePen, Inc. All Rights Reserved
Create a Basic Column Chart - Programatically
Saturday, October 16, 2010
Ad

Recommended

London Ajax User Group Meetup: Vector Graphics
London Ajax User Group Meetup: Vector Graphics
dylanks
?
Dojo Mobile
Dojo Mobile
dylanks
?
Migrando do App Engine para o Heroku
Migrando do App Engine para o Heroku
Filipe Ximenes
?
Interactive web with Fabric.js @ meet.js
Interactive web with Fabric.js @ meet.js
Juriy Zaytsev
?
WebGL: Yesterday, Today, Tomorrow
WebGL: Yesterday, Today, Tomorrow
Bogdan Gorpynchuk
?
Is these a bug
Is these a bug
Mike Taylor
?
Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0
James Thomas
?
Comet / WebSocket Web Applications
Comet / WebSocket Web Applications
Codemotion
?
Introduction to Canvas and Native Web Vector Graphics
Introduction to Canvas and Native Web Vector Graphics
dylanks
?
Basic html5 and javascript
Basic html5 and javascript
wendy017
?
Act 00085 i towns, nouveau framework pour la visualisation 3d web
Act 00085 i towns, nouveau framework pour la visualisation 3d web
ACSG - Section Montr¨¦al
?
Act 00085 i towns, nouveau framework pour la visualisation 3d web
Act 00085 i towns, nouveau framework pour la visualisation 3d web
ACSG Section Montr¨¦al
?
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was Won
Tony Parisi
?
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
JooinK
?
DIY- computer vision with GWT
DIY- computer vision with GWT
Francesca Tosi
?
Bruce lawson-over-the-air
Bruce lawson-over-the-air
brucelawson
?
Zoo Overview
Zoo Overview
djayzen
?
Echo HTML5
Echo HTML5
Nathan Smith
?
HTML5 Intro
HTML5 Intro
PavingWays Ltd.
?
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
Patrick Chanezon
?
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Esri Nederland
?
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of Devices
Francois Daoust
?
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
brucelawson
?
NeXTPLAN
NeXTPLAN
jbrichau
?
Familiar HTML5 - ÊÂÀý¤È¥µ¥ó¥×¥ë¥³©`¥É¤«¤éѧ¤Ö Éí½ü¤ÇÆÕͨ¤Ëʹ¤ï¤Æ¤¤¤ëHTML5
Familiar HTML5 - ÊÂÀý¤È¥µ¥ó¥×¥ë¥³©`¥É¤«¤éѧ¤Ö Éí½ü¤ÇÆÕͨ¤Ëʹ¤ï¤Æ¤¤¤ëHTML5
Sadaaki HIRAI
?
Speak the Web 15.02.2010
Speak the Web 15.02.2010
Patrick Lauke
?
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
agup2009
?
Universal Bridges in Windows 10
Universal Bridges in Windows 10
Abhilash Ashok
?
Building a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James Milner
dylanks
?
Intro to HTML5 Web Storage
Intro to HTML5 Web Storage
dylanks
?

More Related Content

Similar to Web Vector Graphics (20)

Introduction to Canvas and Native Web Vector Graphics
Introduction to Canvas and Native Web Vector Graphics
dylanks
?
Basic html5 and javascript
Basic html5 and javascript
wendy017
?
Act 00085 i towns, nouveau framework pour la visualisation 3d web
Act 00085 i towns, nouveau framework pour la visualisation 3d web
ACSG - Section Montr¨¦al
?
Act 00085 i towns, nouveau framework pour la visualisation 3d web
Act 00085 i towns, nouveau framework pour la visualisation 3d web
ACSG Section Montr¨¦al
?
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was Won
Tony Parisi
?
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
JooinK
?
DIY- computer vision with GWT
DIY- computer vision with GWT
Francesca Tosi
?
Bruce lawson-over-the-air
Bruce lawson-over-the-air
brucelawson
?
Zoo Overview
Zoo Overview
djayzen
?
Echo HTML5
Echo HTML5
Nathan Smith
?
HTML5 Intro
HTML5 Intro
PavingWays Ltd.
?
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
Patrick Chanezon
?
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Esri Nederland
?
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of Devices
Francois Daoust
?
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
brucelawson
?
NeXTPLAN
NeXTPLAN
jbrichau
?
Familiar HTML5 - ÊÂÀý¤È¥µ¥ó¥×¥ë¥³©`¥É¤«¤éѧ¤Ö Éí½ü¤ÇÆÕͨ¤Ëʹ¤ï¤Æ¤¤¤ëHTML5
Familiar HTML5 - ÊÂÀý¤È¥µ¥ó¥×¥ë¥³©`¥É¤«¤éѧ¤Ö Éí½ü¤ÇÆÕͨ¤Ëʹ¤ï¤Æ¤¤¤ëHTML5
Sadaaki HIRAI
?
Speak the Web 15.02.2010
Speak the Web 15.02.2010
Patrick Lauke
?
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
agup2009
?
Universal Bridges in Windows 10
Universal Bridges in Windows 10
Abhilash Ashok
?
Introduction to Canvas and Native Web Vector Graphics
Introduction to Canvas and Native Web Vector Graphics
dylanks
?
Basic html5 and javascript
Basic html5 and javascript
wendy017
?
Act 00085 i towns, nouveau framework pour la visualisation 3d web
Act 00085 i towns, nouveau framework pour la visualisation 3d web
ACSG - Section Montr¨¦al
?
Act 00085 i towns, nouveau framework pour la visualisation 3d web
Act 00085 i towns, nouveau framework pour la visualisation 3d web
ACSG Section Montr¨¦al
?
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was Won
Tony Parisi
?
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
JooinK
?
DIY- computer vision with GWT
DIY- computer vision with GWT
Francesca Tosi
?
Bruce lawson-over-the-air
Bruce lawson-over-the-air
brucelawson
?
Zoo Overview
Zoo Overview
djayzen
?
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
Patrick Chanezon
?
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Esri Nederland
?
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of Devices
Francois Daoust
?
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
brucelawson
?
Familiar HTML5 - ÊÂÀý¤È¥µ¥ó¥×¥ë¥³©`¥É¤«¤éѧ¤Ö Éí½ü¤ÇÆÕͨ¤Ëʹ¤ï¤Æ¤¤¤ëHTML5
Familiar HTML5 - ÊÂÀý¤È¥µ¥ó¥×¥ë¥³©`¥É¤«¤éѧ¤Ö Éí½ü¤ÇÆÕͨ¤Ëʹ¤ï¤Æ¤¤¤ëHTML5
Sadaaki HIRAI
?
Speak the Web 15.02.2010
Speak the Web 15.02.2010
Patrick Lauke
?
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
agup2009
?
Universal Bridges in Windows 10
Universal Bridges in Windows 10
Abhilash Ashok
?

More from dylanks (6)

Building a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James Milner
dylanks
?
Intro to HTML5 Web Storage
Intro to HTML5 Web Storage
dylanks
?
Intro to WebSockets and Comet
Intro to WebSockets and Comet
dylanks
?
HTML5: Toolkits and Gaps
HTML5: Toolkits and Gaps
dylanks
?
London Ajax User Group Meetup: Comet Panel
London Ajax User Group Meetup: Comet Panel
dylanks
?
SWDC 2010: Programming to Patterns
SWDC 2010: Programming to Patterns
dylanks
?
Building a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James Milner
dylanks
?
Intro to HTML5 Web Storage
Intro to HTML5 Web Storage
dylanks
?
Intro to WebSockets and Comet
Intro to WebSockets and Comet
dylanks
?
HTML5: Toolkits and Gaps
HTML5: Toolkits and Gaps
dylanks
?
London Ajax User Group Meetup: Comet Panel
London Ajax User Group Meetup: Comet Panel
dylanks
?
SWDC 2010: Programming to Patterns
SWDC 2010: Programming to Patterns
dylanks
?
Ad

Recently uploaded (20)

Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
?
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
?
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
?
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
?
¡°Key Requirements to Successfully Implement Generative AI in Edge Devices¡ªOpt...
¡°Key Requirements to Successfully Implement Generative AI in Edge Devices¡ªOpt...
Edge AI and Vision Alliance
?
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
?
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
?
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
?
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
?
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
?
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
?
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
?
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
?
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
?
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
?
Wenn alles versagt - IBM Tape sch¨¹tzt, was z?hlt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape sch¨¹tzt, was z?hlt! Und besonders mit dem neust...
Josef Weingand
?
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
?
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
?
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
?
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
?
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
?
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
?
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
?
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
?
¡°Key Requirements to Successfully Implement Generative AI in Edge Devices¡ªOpt...
¡°Key Requirements to Successfully Implement Generative AI in Edge Devices¡ªOpt...
Edge AI and Vision Alliance
?
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
?
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
?
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
?
The Future of AI Agent Development Trends to Watch.pptx
The Future of AI Agent Development Trends to Watch.pptx
Lisa ward
?
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
?
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
?
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Powering Multi-Page Web Applications Using Flow Apps and FME Data Streaming
Safe Software
?
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
?
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
?
Wenn alles versagt - IBM Tape sch¨¹tzt, was z?hlt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape sch¨¹tzt, was z?hlt! Und besonders mit dem neust...
Josef Weingand
?
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
?
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
?
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
?
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
?
Ad

Web Vector Graphics

  • 1. ? SitePen, Inc. All Rights Reserved A Journey Through Web Vector Graphics Dylan Schiemann (@dylans) SitePen, Inc. London Ajax, October 12, 2010 Saturday, October 16, 2010
  • 2. ? SitePen, Inc. All Rights Reserved ajax bsd ceo comet cometdaily conferences cynic dojodylan@dylans hiring javascript open source schiemann sitepentoolkit travel web www dylan Saturday, October 16, 2010
  • 3. ? SitePen, Inc. All Rights Reserved Saturday, October 16, 2010
  • 4. ? SitePen, Inc. All Rights Reserved Saturday, October 16, 2010
  • 5. ? SitePen, Inc. All Rights Reserved Topology and Rheology of Quasi Two-Dimensional Foam 1996 http://arxiv.org/pdf/cond-mat/9904101 Saturday, October 16, 2010
  • 6. ? SitePen, Inc. All Rights Reserved Netscape 2-4: JavaScript, but no drawing I didn't like Java or Flash 1996-1999 Saturday, October 16, 2010
  • 7. ? SitePen, Inc. All Rights Reserved Adobe SVGViewer 2000-2001 Saturday, October 16, 2010
  • 8. ? SitePen, Inc. All Rights Reserved SFW Accendo (NetWindows, SVGViewer, custom JS code) 2003 Saturday, October 16, 2010
  • 9. ? SitePen, Inc. All Rights Reserved 2004 SVG Viewer dead, except in Adobe Acrobat Adobe acquired an obscure vector graphics format Preventing the death of SVG http://dylanschiemann.com/2004/09/12/preventing-the-death- of-svg/ Dojo Toolkit development started Saturday, October 16, 2010
  • 10. ? SitePen, Inc. All Rights Reserved 2005 Dojo 0.1 and 0.2 SVG Viewer Not ideal Mozilla SVG through special builds "One of the very ?rst design decisions of which I was a proponent was that the Dojo Toolkit not be HTML-centric. After working on several SVG-based intranet applications, I was highly motivated to see Dojo work well with SVG and other namespaces that could become relevant in the future." Saturday, October 16, 2010
  • 11. ? SitePen, Inc. All Rights Reserved 2006 "Before this project is launched, dojo¡¯s developers have made signi?cant progress to explore how to integrate SVG support. Another candidate for the back-end render engine is VML. There are two projects in dojo SoC 2006, dojo-svg & dojo-vml, a universal interface is developed to glue the Gfx API and various back-end rendering engine. I prefer dojo- svg, since VML is only rendered within Microsoft Internet Explorer, while SVG is supported natively by Mozilla Firefox 1.5+, or any browsers with Adobe SVG plugin." - Kun Xi Saturday, October 16, 2010
  • 12. ? SitePen, Inc. All Rights Reserved dojox.gfx (Thanks in part to Mozilla!) Bubbles, 10 years later! (Thanks Gavin Doughtie) SVG andVML support http://thinkvitamin.com/code/create-cross-browser-vector-graphics/ 2006 Saturday, October 16, 2010
  • 13. ? SitePen, Inc. All Rights Reserved 2007-2010 Add support for <canvas>, Silverlight, SVGWeb Base vector graphics APIs Charting & real-time capabilities Data store bindings Drawing APIs Saturday, October 16, 2010
  • 14. ? SitePen, Inc. All Rights Reserved Saturday, October 16, 2010
  • 15. ? SitePen, Inc. All Rights Reserved Saturday, October 16, 2010
  • 16. ? SitePen, Inc. All Rights Reserved Saturday, October 16, 2010
  • 17. ? SitePen, Inc. All Rights Reserved What is DojoX GFX? JavaScript cross-browser graphics package Support for SVG, Canvas, VML, Silverlight, and SVGWeb Loosely based on SVG vocabulary Geometry, shapes, transformation matrices Stroke, ?ll, fonts, other visuals Surfaces and groups Interactive (events) Optional SVG to JSON converter Send user-created drawings to the server Saturday, October 16, 2010
  • 18. ? SitePen, Inc. All Rights Reserved dojox.gfx DojoX Drawing Normalized API VMLSVG Canvas Silverlight DojoX Charting SVGWeb Render Saturday, October 16, 2010
  • 19. ? SitePen, Inc. All Rights Reserved Create dojox.gfx.createSurface(node, width, height) All drawing operations done through the surface object Multiple surfaces in a document supported Saturday, October 16, 2010
  • 20. ? SitePen, Inc. All Rights Reserved Draw Several shape primitives to choose from Path, Polyline, Rect, Ellipse, Circle, Line surface.create<shape>(params); Saturday, October 16, 2010
  • 21. ? SitePen, Inc. All Rights Reserved Style <shape>.setFill to ?ll the object <shape>.setStroke to outline the object (think CSS border) ?ll with gradients Saturday, October 16, 2010
  • 22. ? SitePen, Inc. All Rights Reserved Transform Common transformations available through dojox.gfx.matrix ?ipX, ?ipY, ?ipXY, translate, scale, rotate/rotateg skewX, skewY, re?ect, project shape.setTransform(dojox.gfx.matrix.?ipX); shape.applyTransform(dojox.gfx.matrix.translate(10,10)); Saturday, October 16, 2010
  • 23. ? SitePen, Inc. All Rights Reserved Group dojox.gfx.VirtualGroup used to group shapes together can be treated as a single unit var g= surface.createGroup(); g.add(shape); Saturday, October 16, 2010
  • 24. ? SitePen, Inc. All Rights Reserved Event Using <shape>.getEventSource() to get a direct handle to underlying nodes "Old school" event handling functions expect a normalized event object Connect handlers to event sources: dojo.connect(shape.getEventSource(),¡°onmousedown¡±, onMouseDown); Saturday, October 16, 2010
  • 25. ? SitePen, Inc. All Rights Reserved Example Fun with the London Ajax logo Saturday, October 16, 2010
  • 26. ? SitePen, Inc. All Rights Reserved DojoX Charting Library Dojo¡¯s primary charting library is within DojoX Can use DojoX¡¯s gfx library to create animated e?ects Dozens of themes included, supports custom theming and gradation themes Zooming, panning, and scrolling capabilities Supports chart events Support for SVG, VML, Canvas, Silverlight, and other technologies Support for 2D and 3D charts Integration with Dojo data stores Turns boring, static data into something readable and visually appealing. Saturday, October 16, 2010
  • 27. ? SitePen, Inc. All Rights Reserved Chart Types Line Charts Stacked Line Charts Bar Charts Column Charts Pie Charts Scatter Charts Grids Charts can be created declaratively or programmatically. Saturday, October 16, 2010
  • 28. ? SitePen, Inc. All Rights Reserved Chart Pieces ¡°Chart¡±- the object which will house the other pieces of the chart Theme - the series of colors and/or gradation information for the chart¡¯s pieces, lines, and markers Plots - describe how data is to be visualized Axes - the dimensions of data that are being visualized and includes things like specifying labels Series - describes the Data itself that the chart will visualize Markers - shapes placed at key points within data Extras - additional¡°plugin¡±functionalities for the chart Saturday, October 16, 2010
  • 29. ? SitePen, Inc. All Rights Reserved Chart Plugins and E?ects Tooltip - Shows a tooltip when a chart piece is hovered over Highlight - A hover color e?ect when hovering over a chart piece Magnify - Magni?es a marker when hovered over MoveSlice - Animates a pie slice when hovered over Shake - Shakes a given chart piece when hovered over Saturday, October 16, 2010
  • 30. ? SitePen, Inc. All Rights Reserved <script> //require appropriate charting classes dojo.require(¡°dojox.charting.widget.Chart2D¡±); dojo.require(¡°dojox.charting.themes.PlotKit.green¡±); //sample data pieData = [{ x:0, y:9420 }, { x:1, y:10126 }, { x:2, y:10000 }]; </script> //create a pie chart declaratively <div dojoType="dojox.charting.widget.Chart2D" id="viewsChart" theme="dojox.charting.themes.PlotKit.green" style="width: 550px; height: 550px;"> ! <div class="plot" name="default" type="Pie" radius="200" fontColor="black" labelOffset="-20"></div> ! <div class="series" name="January" array="pieData"></div> ! <div class="action" type="Tooltip"></div> ! <div class="action" type="MoveSlice" shift="2"></div> </div> Create a Basic Pie Chart - Declaratively Saturday, October 16, 2010
  • 31. ? SitePen, Inc. All Rights Reserved Create a Basic Pie Chart - Declaratively Saturday, October 16, 2010
  • 32. ? SitePen, Inc. All Rights Reserved Basic Chart Theme Creation (cont.) Saturday, October 16, 2010
  • 33. ? SitePen, Inc. All Rights Reserved <script type="text/javascript"> //require appropriate charting classes dojo.require(¡°dojox.charting.widget.Chart2D¡±); dojo.require(¡°dojox.charting.themes.Tom¡±); //sample data pieData = [{ x:0,y:9420 },{ x:1,y:10126 },{ x:2,y:10000 }]; dojo.ready(function() { ! var BarChart = new dojox.charting.Chart2D("BarChart"); ! BarChart.setTheme(dojox.charting.themes.Tom); ! BarChart.addAxis("x",{fixUpper: "major",includeZero: false,max:10}); ! BarChart.addAxis("y",{vertical: true,fixLower: "major",fixUpper: "major"}); ! BarChart.addPlot("default",{type: "Columns",gap:5}); ! //add a series of data to the chart ! BarChart.addSeries("My Chart Info",pieData,{}); ! BarChart.render(); }); </script> <div id="BarChart" style="width:500px;height:300px;"></div> Create a Basic Column Chart - Programatically Saturday, October 16, 2010
  • 34. ? SitePen, Inc. All Rights Reserved Create a Basic Column Chart - Programatically Saturday, October 16, 2010