wps

PostScript for the Web
git clone https://logand.com/git/wps.git/
Log | Files | Refs | LICENSE

commit 019ae71391e6e2970b254c2d4f9e214325ff74d0
parent e08f78ed9c17520425c5f4295a3c24f677f5c628
Author: Tomas Hlavaty <tom@logand.com>
Date:   Wed, 28 Aug 2019 15:06:13 +0200

index.html added

Diffstat:
Aindex.html | 5122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 5122 insertions(+), 0 deletions(-)

diff --git a/index.html b/index.html @@ -0,0 +1,5122 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" +lang="en" xml:lang="en"> +<head> + +<title>WPS: PostScript for the Web</title> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> +<meta name="generator" content="Org-mode"/> +<meta name="generated" content="2010-01-24 21:15:49 CET"/> +<meta name="author" content="Tomas Hlavaty"/> +<meta name="description" content="PostScript and PDF interpreter for HTML 5 canvas"/> +<meta name="keywords" content="PostScript, PDF, interpreter, HTML 5, canvas, JavaScript"/> +<style type="text/css"> + <!--/*--><![CDATA[/*><!--*/ + html { font-family: Times, serif; font-size: 12pt; } + .title { text-align: center; } + .todo { color: red; } + .done { color: green; } + .tag { background-color: #add8e6; font-weight:normal } + .target { } + .timestamp { color: #bebebe; } + .timestamp-kwd { color: #5f9ea0; } + p.verse { margin-left: 3% } + pre { + border: 1pt solid #AEBDCC; + background-color: #F3F5F7; + padding: 5pt; + font-family: courier, monospace; + font-size: 90%; + overflow:auto; + } + table { border-collapse: collapse; } + td, th { vertical-align: top; } + dt { font-weight: bold; } + div.figure { padding: 0.5em; } + div.figure p { text-align: center; } + .linenr { font-size:smaller } + .code-highlighted {background-color:#ffff00;} + .org-info-js_info-navigation { border-style:none; } + #org-info-js_console-label { font-size:10px; font-weight:bold; + white-space:nowrap; } + .org-info-js_search-highlight {background-color:#ffff00; color:#000000; + font-weight:bold; } + /*]]>*/--> +</style> +<script type="text/javascript"> +<!--/*--><![CDATA[/*><!--*/ + function CodeHighlightOn(elem, id) + { + var target = document.getElementById(id); + if(null != target) { + elem.cacheClassElem = elem.className; + elem.cacheClassTarget = target.className; + target.className = "code-highlighted"; + elem.className = "code-highlighted"; + } + } + function CodeHighlightOff(elem, id) + { + var target = document.getElementById(id); + if(elem.cacheClassElem) + elem.className = elem.cacheClassElem; + if(elem.cacheClassTarget) + target.className = elem.cacheClassTarget; + } +/*]]>*///--> +</script> +</head> +<body> +<div id="content"> + + +<p class="h0">WPS: PostScript for the Web</p> + +<p> +Welcome to WPS, a PostScript and PDF interpreter for HTML 5 canvas. +</p> +<p> +Note that to see and run the examples, JavaScript must be enabled and +your browser must support HTML 5 canvas (latest Firefox, Opera and +Chrome should work). +</p> +<p> +This document allows you to try simple PostScript programs in the WPS +sandbox. A few examples are presented here accompanied by a brief +description of the interpreter and listing some implementation notes +for my future reference. +</p> + + +<style> +tt {background-color:#fdf} +canvas {width:12em;height:12em;border:1px dashed black} +</style> + +<div id="wps" style="display:none"> + +<pre class="src src-text">%%% (c) 2009 Tomas Hlavaty + +currentdict/systemdict currentdict put +systemdict/{/mark cvx put +systemdict/[/mark cvx put +systemdict/] +/counttomark cvx +/array cvx +/astore cvx +/exch cvx +/pop cvx +5 array astore cvx put +systemdict/}/] cvx/cvx cvx 2 array astore cvx put +systemdict/def{currentdict 2 index 2 index put pop pop}put + +/maxlength 1000 def % TODO +/.bdef{bind def}bind def +/.xdef{exch def}.bdef +/dup{0 index}.bdef +/load{dup where pop exch get}.bdef +/.ldef{load def}.bdef +/if{{}ifelse}.bdef +/cleartomark{array pop}.bdef +/known{exch begin where{currentdict eq}{false}if end}.bdef +/store{1 index where{3 1 roll put}{def}ifelse}.bdef +/not{{false}{true}ifelse}.bdef +/.logand{{{true}{false}ifelse}{pop false}ifelse}.bdef +/and/.logand .ldef % TODO numeric and +/.logor{{pop true}{{true}{false}ifelse}ifelse}.bdef +/or/.logor .ldef % TODO numeric or +/ne{eq not}.bdef +/ge{lt not}.bdef +/le{1 index 1 index eq 3 1 roll lt or}.bdef +/gt{le not}.bdef +/.repeat{1 1 4 2 roll for}.bdef + +%% math + +/floor{.math(floor)1 .call}.bdef + +/neg{0 exch sub}.bdef +/add{neg sub}.bdef +/idiv{div floor}.bdef + +/abs{.math(abs)1 .call}.bdef +/.acos{.math(acos)1 .call}.bdef +/.asin{.math(asin)1 .call}.bdef +/atan{exch .math(atan)1 .call}.bdef +/.atan2{.math(atan2)2 .call}.bdef +/ceiling{.math(ceil)1 .call}.bdef +/cos{.math(cos)1 .call}.bdef +/.exp{.math(exp)1 .call}.bdef +/log{.math(log)1 .call}.bdef +/.max{.math(max)2 .call}.bdef +/.min{.math(min)2 .call}.bdef +/.pow{.math(pow)2 .call}.bdef +/.random{.math(random)0 .call}.bdef +/rand{.random}.bdef % TODO follow spec +/round{.math(round)1 .call}.bdef +/sin{.math(sin)1 .call}.bdef +/sqrt{.math(sqrt)1 .call}.bdef +/.tan{.math(tan)1 .call}.bdef +/truncate{.math(truncate)1 .call}.bdef % TODO Math.truncate does not exist! + +/.e{.math(E)get}.bdef +/.ln2{.math(LN2)get}.bdef +/.ln10{.math(LN10)get}.bdef +/.log2e{.math(LOG2E)get}.bdef +/.log10e{.math(LOG10E)get}.bdef +/.pi{.math(PI)get}.bdef +/.sqrt1_2{.math(SQRT1_2)get}.bdef +/.sqrt2{.math(SQRT2)get}.bdef + +/cvr{1.0 mul}.bdef +/cvi{round}.bdef + +%% html + +/.setTimeout{.window(setTimeout)2 .call}.bdef % cb ms -- id +/.clearTimeout{.window(clearTimeout)1 .call pop}.bdef % id -- +/.setInterval{.window(setInterval)2 .call}.bdef % cb ms -- id +/.clearInterval{.window(clearInterval)1 .call pop}.bdef % id -- +/.document{.window(document)get}.bdef % -- document +/.getElementById{.document(getElementById)1 .call}.bdef % id -- w +/.hook{put}.bdef % e k cb -- + +%% canvas + +/.setGc{.getElementById(2d)exch(getContext)1 .call/.$gc .xdef}.bdef +/.gc{/.$gc load}.bdef +/.gget{.gc exch get}.bdef +/.gput{.gc 3 1 roll exch put}.bdef +/.gcall0{.gc 3 1 roll .call pop}.bdef +/.gcall1{.gc 3 1 roll .call}.bdef +/.gcanvas{(canvas).gget}.bdef +/.gdim{.gcanvas exch(height)exch put .gcanvas exch(width)exch put}.bdef +/.gbox{.gdim pop pop}.bdef % TODO compute properly + +/.save{(save)0 .gcall0}.bdef +/.restore{(restore)0 .gcall0}.bdef +/.scale{(scale)2 .gcall0}.bdef +/.rotate{(rotate)1 .gcall0}.bdef +/.translate{(translate)2 .gcall0}.bdef +/.transform{(transform)6 .gcall0}.bdef +/.setTransform{(setTransform)6 .gcall0}.bdef +/.createLinearGradient{(createLinearGradient)4 .gcall1}.bdef +/.createRadialGradient{(createRadialGradient)6 .gcall1}.bdef +/.createPattern{(createPattern)2 .gcall1}.bdef +/.clearRect{(clearRect)4 .gcall0}.bdef +/.fillRect{(fillRect)4 .gcall0}.bdef +/.strokeRect{(strokeRect)4 .gcall0}.bdef +/.beginPath{(beginPath)0 .gcall0}.bdef +/.closePath{(closePath)0 .gcall0}.bdef +/.moveTo{(moveTo)2 .gcall0}.bdef +/.lineTo{(lineTo)2 .gcall0}.bdef +/.quadraticCurveTo{(quadraticCurveTo)4 .gcall0}.bdef +/.bezierCurveTo{(bezierCurveTo)6 .gcall0}.bdef +/.arcTo{(arcTo)5 .gcall0}.bdef +/.rect{(rect)4 .gcall0}.bdef +/.arc{(arc)6 .gcall0}.bdef +/.fill{(fill)0 .gcall0}.bdef +/.stroke{(stroke)0 .gcall0}.bdef +/.clip{(clip)0 .gcall0}.bdef +/.isPointInPath{(isPointInPath)2 .gcall1}.bdef +/.fillText{(fillText)4 .gcall0}.bdef +%/.fillText{}.bdef % TODO not working in Firefox +/.strokeText{(strokeText)4 .gcall0}.bdef +%/.strokeText{}.bdef % TODO not working in Firefox +/.measureText{(measureText)1 .gcall1}.bdef +/.drawImage1{(drawImage1)5 .gcall0}.bdef +/.drawImage2{(drawImage2)9 .gcall0}.bdef +/.createImageData1{(createImageData1)1 .gcall1}.bdef +/.createImageData2{(createImageData2)2 .gcall1}.bdef +/.getImageData{(getImageData)4 .gcall1}.bdef +/.putImageData{(putImageData)7 .gcall0}.bdef + +/.getGlobalAlpha{(globalAlpha).gget}.bdef +/.getGlobalCompositeOperation{(globalCompositeOperation).gget}.bdef +/.getStrokeStyle{(strokeStyle).gget}.bdef +/.getFillStyle{(fillStyle).gget}.bdef +/.getLineWidth{(lineWidth).gget}.bdef +/.getLineCap{(lineCap).gget}.bdef +/.getLineJoin{(lineJoin).gget}.bdef +/.getMiterLimit{(miterLimit).gget}.bdef +/.getShadowOffsetX{(shadowOffsetX).gget}.bdef +/.getShadowOffsetY{(shadowOffsetY).gget}.bdef +/.getShadowBlur{(shadowBlur).gget}.bdef +/.getShadowColor{(shadowColor).gget}.bdef +/.getFont{(font).gget}.bdef +/.getTextAlign{(textAlign).gget}.bdef +/.getTextBaseline{(textBaseline).gget}.bdef + +/.setGlobalAlpha{(globalAlpha).gput}.bdef +/.setGlobalCompositeOperation{(globalCompositeOperation).gput}.bdef +/.setStrokeStyle{(strokeStyle).gput}.bdef +/.setFillStyle{(fillStyle).gput}.bdef +/.setLineWidth{(lineWidth).gput}.bdef +/.setLineCap{(lineCap).gput}.bdef +/.setLineJoin{(lineJoin).gput}.bdef +%/.setLineCap{pop}.bdef % TODO remove this later (Firefox throws) +%/.setLineJoin{pop}.bdef % TODO remove this later (Firefox throws) +/.setMiterLimit{(miterLimit).gput}.bdef +/.setShadowOffsetX{(shadowOffsetX).gput}.bdef +/.setShadowOffsetY{(shadowOffsetY).gput}.bdef +/.setShadowBlur{(shadowBlur).gput}.bdef +/.setShadowColor{(shadowColor).gput}.bdef +/.setFont{(font).gput}.bdef +/.setTextAlign{(textAlign).gput}.bdef +/.setTextBaseline{(textBaseline).gput}.bdef + +%% PostScript + +/.deg2rad{.pi 180 div mul}.bdef +/.rad2deg{180 .pi div mul}.bdef + +/.$cx 0 def +/.$cy 0 def +/.$px 0 def +/.$py 0 def +/.setPoint{/.$cy .xdef/.$cx .xdef}.bdef +/.setPath{/.$py .xdef/.$px .xdef}.bdef +/currentpoint{/.$cx load /.$cy load}.bdef +/.getPath{/.$px load /.$py load}.bdef + +/identmatrix{pop [1 0 0 1 0 0]}.bdef % TODO fill +/matrix{6 array identmatrix}.bdef +/setmatrix{/.$tm .xdef}.bdef +/defaultmatrix{pop matrix}.bdef % TODO fill +/initmatrix{matrix defaultmatrix setmatrix}.bdef +/currentmatrix{pop /.$tm load}.bdef % TODO fill +initmatrix + +/.getTmd{/.$tmd load}.bdef +/.setTmd{/.$tmd .xdef}.bdef +/.resetTmd{matrix .setTmd}.bdef +.resetTmd + +/.update{ % m -- + currentpoint 2 index % m .$cx .$cy m + .xy .setPoint % m + dup .getTmd exch .mmul .setTmd % (.$tmd x m) + dup currentmatrix exch .mmul setmatrix % = .$tm x m +}.bdef + +/transform{dup type(arraytype)ne{.getTmd}if .xy}.bdef +/itransform{dup type(arraytype)ne{.getTmd}if .minv .xy}.bdef + +/.scaleM{0 0 3 2 roll 0 0 6 array astore}.bdef % x y -- [x 0 0 y 0 0] +/.scale3{pop .scaleM}.bdef +/.scale2{2 copy .scaleM .update .scale}.bdef +/scale{dup type(arraytype)eq{.scale3}{.scale2}ifelse}.bdef + +/.translateM{1 0 0 1 6 4 roll 6 array astore}.bdef % x y -- [1 0 0 1 x y] +/.translate3{pop .translateM}.bdef +/.translate2{2 copy .translateM .update .translate}.bdef +/translate{dup type(arraytype)eq{.translate3}{.translate2}ifelse}.bdef + +/.rotateM{dup cos exch sin dup neg 2 index 0 0 6 array astore}.bdef % a -- [c s -s c 0 0] +/.rotate2{pop .deg2rad .rotateM}.bdef +/.rotate1{.deg2rad dup .rotateM .update .rotate}.bdef +/rotate{dup type(arraytype)eq{.rotate2}{.rotate1}ifelse}.bdef + +%matrix concat &#8211; Replace CTM by matrix &#180; CTM +%matrix1 matrix2 matrix3 concatmatrix matrix3 Fill matrix3 with matrix1 &#180; matrix2 + +%dx dy dtransform dx&#162; dy&#162; Transform distance (dx, dy) by CTM +%dx dy matrix dtransform dx&#162; dy&#162; Transform distance (dx, dy) by matrix + +%dx&#162; dy&#162; idtransform dx dy Perform inverse transform of distance (dx&#162;, dy&#162;) by CTM +%dx&#162; dy&#162; matrix idtransform dx dy Perform inverse transform of distance (dx&#162;, dy&#162;) by matrix + +%matrix1 matrix2 invertmatrix matrix2 Fill matrix2 with inverse of matrix1 + +/gsave{.save}.bdef +/grestore{.restore}.bdef +/clip{.clip}.bdef +/rectclip{.clearRect}.bdef +/rectfill{.fillRect}.bdef +/rectstroke{.strokeRect}.bdef +/newpath{.beginPath}.bdef +/closepath{.closePath}.bdef +/moveto{2 copy .setPoint 2 copy .setPath .resetTmd .moveTo}.bdef +/lineto{2 copy .setPoint 2 copy .setPath .resetTmd .lineTo}.bdef +/arcto{.arcTo}.bdef + +/setlinewidth{.setLineWidth}.bdef +/setlinecap{.setLineCap}.bdef % TODO +/setlinejoin{.setLineJoin}.bdef % TODO +/setmiterlimit{.setMiterLimit}.bdef + +/currentlinewidth{.getLineWidth}.bdef +/currentlinecap{&lt;&lt;/butt 0/round 1/square 2&gt;&gt; .getLineCap get}.bdef +/currentlinejoin{&lt;&lt;/miter 0/round 1/bevel 2&gt;&gt; .getLineJoin get}.bdef +/currentmiterlimit{.getMiterLimit}.bdef + +/setgray{255 mul dup dup .rgb dup .setStrokeStyle .setFillStyle}.bdef +/setrgbcolor{3{255 mul round 3 1 roll}repeat .rgb dup .setStrokeStyle .setFillStyle}.bdef +/setcmykcolor{setrgbcolor pop}.bdef % TODO +/sethsbcolor{setrgbcolor}.bdef % TODO +/clippath{0 0 .gcanvas(width)get .gcanvas(height)get .rect}.bdef % TODO +/show{currentpoint 3 2 roll 3 copy .fillText .strokeText}.bdef % TODO + +/rlineto{.getTmd .xy /.$py load add exch /.$px load add exch .getTmd .minv .xy lineto}.bdef +/curveto{2 copy .setPoint 2 copy .setPath .resetTmd .bezierCurveTo}.bdef + +/currentflat{42}.bdef % TODO +/setflat{pop}.bdef % TODO + +/arc{.deg2rad exch .deg2rad exch true .arc}.bdef % TODO currentpoint +/arcn{.deg2rad exch .deg2rad exch false .arc}.bdef % TODO currentpoint + +/fill{.fill newpath currentpoint .moveTo}.bdef % TODO + +/setdash{pop pop}.bdef % TODO + +/stroke{.stroke newpath currentpoint .moveTo}.bdef + +/showpage{}.bdef % TODO +/grestoreall{}.bdef % TODO +/readonly{}.bdef % TODO +/currentfile{(url?)}.bdef % TODO +/eexec{pop}.bdef % TODO +/findfont{}.bdef % TODO +/scalefont{pop}.bdef % TODO +/setfont{pop}.bdef % TODO C.font = N + "pt " + F.V; +/stopped{}.bdef % TODO +/loop{}.bdef % TODO !!! +/string{}.bdef % TODO +/pathbbox{}.bdef % TODO +/urx{}.bdef % TODO +/ury{}.bdef % TODO +/llx{}.bdef % TODO +/lly{}.bdef % TODO +/pagewidth{}.bdef % TODO +/pageheight{}.bdef % TODO +/inwidth{}.bdef % TODO +/inheight{}.bdef % TODO +/usertime{}.bdef % TODO +/srand{}.bdef % TODO + +%% PDF + +/w{setlinewidth}.bdef +/J{setlinecap}.bdef % TODO +/j{setlinejoin}.bdef % TODO +/M{setmiterlimit}.bdef +/d{setdash}.bdef % TODO +/ri{}.bdef % TODO +/i{1 .min setflat}.bdef +/gs{}.bdef % TODO +/q{gsave}.bdef +/Q{grestore}.bdef +/cm{.transform}.bdef +/m{newpath moveto}.bdef % TODO only if not m previously +/l{lineto}.bdef +/c{.bezierCurveTo}.bdef +/v{currentpoint 6 2 roll c}.bdef +/y{2 copy c}.bdef +/h{closepath}.bdef % TODO +/re{.rect}.bdef % TODO really, or x y m , x+w y l , x+w y+h l , x y+h l , h +/S{stroke}.bdef +/s{h S}.bdef +/f{fill}.bdef % TODO +/F{f}.bdef +/f*{}.bdef % TODO +/B{f S}.bdef +/B*{f* S}.bdef +/b{h B}.bdef +/b*{h B*}.bdef +/n{}.bdef % TODO +/W{clip}.bdef % TODO +/W*{clip}.bdef % TODO +/BT{}.bdef % TODO +/ET{}.bdef % TODO +/Tc{}.bdef % TODO +/Tw{}.bdef % TODO +/Tz{}.bdef % TODO +/TL{}.bdef % TODO +/Tf{setfont}.bdef % TODO +/Tr{}.bdef % TODO +/Ts{}.bdef % TODO +/Td{translate 0 0 moveto}.bdef +/TD{}.bdef % TODO +/Tm{}.bdef % TODO +/T*{}.bdef % TODO +/Tj{show}.bdef % TODO +/TJ{}.bdef % TODO +/'{}.bdef % TODO +/"{}.bdef % TODO +/d0{}.bdef % TODO +/d1{}.bdef % TODO +/CS{}.bdef % TODO +/cs{}.bdef % TODO +%/SC/setcolor .ldef +/SCN{}.bdef % TODO +%/sc/setcolor .ldef +/scn{}.bdef % TODO +/G{}.bdef % TODO +/g{}.bdef % TODO +/RG{}.bdef % TODO +/rg{setrgbcolor}.bdef % TODO +/K{}.bdef % TODO +/k{}.bdef % TODO +/sh{}.bdef % TODO +/BI{}.bdef % TODO +/ID{}.bdef % TODO +/EI{}.bdef % TODO +/Do{}.bdef % TODO +/MP{}.bdef % TODO +/DP{}.bdef % TODO +/BMC{}.bdef % TODO +/BDC{}.bdef % TODO +/EMC{}.bdef % TODO +/BX{}.bdef % TODO +/EX{}.bdef % TODO + +%% finish + +false .strictBind + +/userdict 1000 dict def +userdict begin +</pre> + + + +</div> + +<script type="text/javascript" src="wps.js"></script> +<script> +function $(Id) {return document.getElementById(Id);} +function $$(Id) {return $(Id).textContent;} +wps = new Wps; +wps.parse($$("wps")); +</script> + + +<div id="table-of-contents"> +<h1>Table of Contents</h1> +<div id="text-table-of-contents"> +<ul> +<li><a href="#sec-1">WPS sandbox </a></li> +<li><a href="#sec-2">PostScript interpreter </a> +<ul> +<li><a href="#sec-2.1">Trivial example </a></li> +<li><a href="#sec-2.2">Example with PostScript reader </a></li> +<li><a href="#sec-2.3">Example with recursion </a></li> +<li><a href="#sec-2.4">Execution stack </a></li> +<li><a href="#sec-2.5">PostScript data types </a></li> +<li><a href="#sec-2.6">Quoting and execution </a></li> +</ul> +</li> +<li><a href="#sec-3">Drawing with PostScript </a> +<ul> +<li><a href="#sec-3.1">Bowtie example </a></li> +<li><a href="#sec-3.2">Analog clock example </a></li> +<li><a href="#sec-3.3">Fill example </a></li> +<li><a href="#sec-3.4">Tiger example </a></li> +</ul> +</li> +<li><a href="#sec-4">Drawing with PDF </a> +<ul> +<li><a href="#sec-4.1">Heart example </a></li> +<li><a href="#sec-4.2">Rectangle example </a></li> +<li><a href="#sec-4.3">Triangles example </a></li> +<li><a href="#sec-4.4">Smile example </a></li> +<li><a href="#sec-4.5">Star example </a></li> +<li><a href="#sec-4.6">Squares example </a></li> +<li><a href="#sec-4.7">Two squares example </a></li> +</ul> +</li> +<li><a href="#sec-5">Operators and JavaScript bindings </a> +<ul> +<li><a href="#sec-5.1">Native operators </a></li> +<li><a href="#sec-5.2">Core operators </a></li> +<li><a href="#sec-5.3">HTML 5 canvas methods and attributes </a> +<ul> +<li><a href="#sec-5.3.1">Canvas methods </a></li> +<li><a href="#sec-5.3.2">Canvas attributes </a></li> +<li><a href="#sec-5.3.3">Other operators </a></li> +<li><a href="#sec-5.3.4">Other attributes </a></li> +</ul> +</li> +<li><a href="#sec-5.4">PostScript operators </a></li> +<li><a href="#sec-5.5">PDF operators </a></li> +</ul> +</li> +<li><a href="#sec-6">Supported Browsers </a></li> +<li><a href="#sec-7">Limitations and Known Issues </a></li> +<li><a href="#sec-8">Changes </a></li> +<li><a href="#sec-9">Links </a></li> +</ul> +</div> +</div> + +<div id="outline-container-1" class="outline-1"> +<h1 id="sec-1">WPS sandbox </h1> +<div class="outline-text-1" id="text-1"> + + + + +<canvas id="xsandbox"></canvas> +<p>Sandbox:</p> +<p> +<textarea id="sandbox" style="width:100%" rows="18"> +/n 10 def +/w 25 def + +0 0 n w mul dup .gbox + +4 dict begin + 0 1 n 1 sub { + /i exch def + /ii 1 1 n div i mul sub def + 0 1 n 1 sub { + /j exch def + /jj 1 1 n div j mul sub def + ii jj 0 setrgbcolor + w j mul w i mul w w rectfill + } for + } for +end +</textarea> +</p> +<script> +function sandbox() {(new Wps).parse($$("wps"), "(xsandbox) .setGc", $("sandbox").value);} +</script> +<button onclick="javascript:sandbox();">Run</button> code from sandbox. + +</div> + +</div> + +<div id="outline-container-2" class="outline-1"> +<h1 id="sec-2">PostScript interpreter </h1> +<div class="outline-text-1" id="text-2"> + + +<p> +A few initial ideas and questions: +</p> +<ul> +<li> +Learn and implement a Forth like language. PostScript seems like a +good choice: +<ul> +<li> +It has the right syntax and stack based evaluation. +</li> +<li> +It is practical and widely used. +</li> +<li> +It has long sucessful history in print and publishing (and more). +</li> +<li> +It is a predecessor of PDF. +</li> +<li> +Almost everything (e.g. editors, pictures, documentation) can be +reused to a great extent. +</li> +<li> +It is ideal for HTML 5 canvas experiments because from the +PostScript point of view, canvas is just another low level device. +</li> +</ul> +</li> +<li> +Flexibility and simplicity first. +<ul> +<li> +Optimize for fast code change, not for raw running speed. Keep +the code small and regular if possible. +</li> +<li> +Can JavaScript be used as a portable assembler for the Web? Is +building scripting languages on top of JavaScript feasible and +efficient enough for real-world use? If not, why? Find the +limits. +</li> +</ul> +</li> +<li> +Keep the language/environment specific core as small as possible. +<ul> +<li> +Allow to port the interpreter to other languages on both +client and server side. +</li> +<li> +Be open for the possibility of running "the same code" on both the +client and server side. +</li> +</ul> +</li> +<li> +Can PDF documents be displayed in web browsers without server-side +image rendering? +<ul> +<li> +Implement a canvas based version of PDF page contents in <a href="../ondoc/index.html">OnDoc</a>. +</li> +</ul> +</li> +<li> +It might be possible to implement different backend devices to be +used instead of HTML 5 canvas, for example an SVG device. +</li> +<li> +Investigate the possibility of implementing a Lisp interpreter +suitable for production use in web applications. + +</li> +</ul> + +<p>There are several things WPS is about: +</p> +<ul> +<li> +stack(s) +</li> +<li> +function (operator) dictionary +</li> +<li> +reader +</li> +<li> +interpreter/evaluator +</li> +<li> +data types +</li> +<li> +native bindings (JavaScript FFI) +</li> +<li> +PostScript and PDF API + +</li> +</ul> + +<p><a href="http://en.wikipedia.org/wiki/PostScript">PostScript</a> can be seen as a crossover between <a href="http://en.wikipedia.org/wiki/Forth_(programming_language)">Forth</a> and <a href="http://en.wikipedia.org/wiki/LISP">Lisp</a> +programming languages. It is (roughly) a programming language with +<a href="http://en.wikipedia.org/wiki/Reverse_Polish_notation">RPN</a>, complex data types, garbage collection and specialized +drawing operators. +</p> + +</div> + +<div id="outline-container-2.1" class="outline-2"> +<h2 id="sec-2.1">Trivial example </h2> +<div class="outline-text-2" id="text-2.1"> + + +<p> +The core essence of a RPN calculator is captured in the JavaScript +code bellow. +</p> + + +<div id="example1"> + +<pre class="src src-js2"><span style="color: #00cdcd; font-weight: bold;">function</span> <span style="color: #0000cd; font-weight: bold;">example1</span>() { + <span style="color: #cd0000;">// define stack and operators +</span> <span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">Os</span> = []; + <span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">Sd</span> = {}; + Sd[<span style="color: #008b00;">"+"</span>] = <span style="color: #00cdcd; font-weight: bold;">function</span>() {Os.push(Os.pop() + Os.pop());}; + Sd[<span style="color: #008b00;">"="</span>] = <span style="color: #00cdcd; font-weight: bold;">function</span>() {alert(Os.pop());}; + <span style="color: #cd0000;">// compute 1 2 = 3 + = +</span> Os.push(1); + Os.push(2); + Sd[<span style="color: #008b00;">"="</span>](); + Os.push(3); + Sd[<span style="color: #008b00;">"+"</span>](); + Sd[<span style="color: #008b00;">"="</span>](); +} +</pre> + + + +</div> +<script> +function ex1() { + eval($$("example1")); + example1(); +} +</script> +<button onclick="javascript:ex1()">Eval</button> +"<tt>1 2 = 3 + =</tt>" + +<p> +<code>Os</code> stands for Operand Stack, which holds arguments for operators. +<code>Sd</code> is a System Dictionary which contains definitions of operators +(JavaScript functions in this case). +</p> +</div> + +</div> + +<div id="outline-container-2.2" class="outline-2"> +<h2 id="sec-2.2">Example with PostScript reader </h2> +<div class="outline-text-2" id="text-2.2"> + + +<p> +PostScript has simple but non-trivial syntax so a reader which reads +text and creates internal PostScript objects is necessary. The reader +and evaluator is called <code>Ps0</code> (an empty PostScript interpreter) in the +JavaScript code bellow. +</p> + + +<div id="example2"> + +<pre class="src src-js2"><span style="color: #00cdcd; font-weight: bold;">function</span> <span style="color: #0000cd; font-weight: bold;">example2</span>(<span style="color: #2e8b57;">T</span>) { + <span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">Os</span> = []; + <span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">Sd</span> = {}; + <span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">Ds</span> = [Sd]; + <span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">Es</span> = []; + Sd[<span style="color: #00cdcd; font-weight: bold;">new</span> Symbol(<span style="color: #008b00;">"+"</span>)] = <span style="color: #00cdcd; font-weight: bold;">function</span>() {Os.push(Os.pop() + Os.pop());}; + Sd[<span style="color: #00cdcd; font-weight: bold;">new</span> Symbol(<span style="color: #008b00;">"dup"</span>)] = <span style="color: #00cdcd; font-weight: bold;">function</span>() {<span style="color: #00cdcd; font-weight: bold;">var</span> <span style="color: #cdcd00;">X</span> = Os.pop(); Os.push(X); Os.push(X);}; + Sd[<span style="color: #00cdcd; font-weight: bold;">new</span> Symbol(<span style="color: #008b00;">"="</span>)] = <span style="color: #00cdcd; font-weight: bold;">function</span>() {alert(Os.pop());}; + (<span style="color: #00cdcd; font-weight: bold;">new</span> Ps0(Os, Ds, Es)).parse(T); <span style="color: #cd0000;">// read and interpret code T +</span>} +</pre> + + + +</div> +<script> +function ex2() { + eval($$("example2")); + example2($$("ex2")); +} +</script> +<button onclick="javascript:ex2()">Eval</button> +"<tt id="ex2">12 34 + dup = 56 + =</tt>" + +<p> +<code>Ds</code> is a Dictionary Stack allowing users to redefine existing +operators and revert back to the original ones. <code>Es</code> is an Execution +Stack which is used to implement a tail recursive evaluator. +</p> +</div> + +</div> + +<div id="outline-container-2.3" class="outline-2"> +<h2 id="sec-2.3">Example with recursion </h2> +<div class="outline-text-2" id="text-2.3"> + + +<p> +It is possible to write recursive code in PostScript. The following +PostScript code is from the <a href="http://www.math.ubc.ca/~cass/graphics/manual/pdf/ch9.pdf">Recursion in PostScript PDF document</a>. +</p> + + +<div id="example3"> + +<pre class="src src-ps"><span style="color: #0000cd; font-weight: bold;">/factorial1</span> { + 1 <span style="color: #00cdcd; font-weight: bold;">dict</span> <span style="color: #00cdcd; font-weight: bold;">begin</span> + <span style="color: #cdcd00;">/n</span> exch <span style="color: #00cdcd; font-weight: bold;">def</span> + n 0 eq {1}{n n 1 sub factorial1 mul} <span style="color: #00cdcd; font-weight: bold;">ifelse</span> + <span style="color: #00cdcd; font-weight: bold;">end</span> +} <span style="color: #00cdcd; font-weight: bold;">def</span> + +5 factorial1 = + +<span style="color: #0000cd; font-weight: bold;">/factorial2</span> { + dup 0 eq {pop 1}{dup 1 sub factorial2 mul} <span style="color: #00cdcd; font-weight: bold;">ifelse</span> +} <span style="color: #00cdcd; font-weight: bold;">def</span> + +5 factorial2 = + +<span style="color: #cd0000;">% based on the PostScript example from</span> +<span style="color: #cd0000;">% http://partners.adobe.com/public/developer/en/ps/sdk/sample/BlueBook.zip</span> + +<span style="color: #0000cd; font-weight: bold;">/factorial3</span> { + dup 1 gt {dup 1 sub factorial3 mul} <span style="color: #00cdcd; font-weight: bold;">if</span> +} <span style="color: #00cdcd; font-weight: bold;">def</span> + +5 factorial3 = +</pre> + + + +</div> +<script> +function ex3() {(new Wps).parse($$("wps"), $$("example3"));} +</script> +<button onclick="javascript:ex3();">Run</button> the example. + +</div> + +</div> + +<div id="outline-container-2.4" class="outline-2"> +<h2 id="sec-2.4">Execution stack </h2> +<div class="outline-text-2" id="text-2.4"> + + +<p> +The interpreter manages its Execution Stack explicitly. +</p> +<p> +Most operators simply: +</p> +<ol> +<li> +get their arguments from the Operand Stack +</li> +<li> +perform some computation and/or side effects +</li> +<li> +push results to the Operand Stack + +</li> +</ol> + +<p>Some operators are more complex and involve some kind of control flow, +e.g. <a href="http://www.capcode.de/help/if">if</a>, <a href="http://www.capcode.de/help/repeat">repeat</a>, <a href="http://www.capcode.de/help/for">for</a>, <a href="http://www.capcode.de/help/loop">loop</a> +operators. Such operators: +</p> +<ol> +<li> +get their arguments from the Operand Stack +</li> +<li> +perform single step of some computation and/or side effects +</li> +<li> +push the continuation (code and arguments to be executed next) to +the Execution Stack + +</li> +</ol> + +<p><a href="http://en.wikipedia.org/wiki/Tail_call">Tail Call Optimisation</a> is implemented using <a href="http://logand.com/picoWiki/trampoline">trampoline</a>. The evaluator +runs in a loop getting the next <a href="http://en.wikipedia.org/wiki/Continuation">continuation</a> from the Execution Stack. +Operators that want to "continue" their execution (i.e. use the +interpreter to run other operators, including themselves) must perform +only one step at a time and save the remaining steps (continuation) on +the Execution Stack. +</p> +<p> +For example, the <a href="http://www.capcode.de/help/if">if</a> operator saves the "then" or "else" code +branch to the Execution Stack depending on the value of the "test" +argument. It does not "evaluate" the chosen branch directly +(recursively) but leaves the control to the evaluator loop. +</p> +<p> +The whole process of interpreting is fed from JavaScript strings which +are obtained from the content of HTML elements (sometimes hidden from +this document). +</p> +</div> + +</div> + +<div id="outline-container-2.5" class="outline-2"> +<h2 id="sec-2.5">PostScript data types </h2> +<div class="outline-text-2" id="text-2.5"> + + +<p> +PostScript has quite rich set of data types. +See <a href="http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf">PostScript Language Reference PDF document</a> for more details. +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">category</th><th scope="col">type</th><th scope="col">executable</th><th scope="col">example</th><th scope="col">spec</th></tr> +</thead> +<tbody> +<tr><td>simple</td><td>boolean</td><td></td><td>true false</td><td></td></tr> +<tr><td></td><td>fontID</td><td></td><td></td><td></td></tr> +<tr><td></td><td>integer</td><td></td><td>42 -123 0</td><td></td></tr> +<tr><td></td><td>mark</td><td></td><td></td><td></td></tr> +<tr><td></td><td>name</td><td>Y</td><td>draw /draw</td><td></td></tr> +<tr><td></td><td>null</td><td></td><td>null</td><td></td></tr> +<tr><td></td><td>operator</td><td>Y</td><td></td><td></td></tr> +<tr><td></td><td>real</td><td></td><td>3.14 1e-10</td><td></td></tr> +<tr><td></td><td>save</td><td></td><td></td><td></td></tr> +<tr><td>composite</td><td>array</td><td>Y</td><td>[1 /hi 3.14] {1 2 add}</td><td></td></tr> +<tr><td></td><td>condition</td><td></td><td></td><td>Display PostScript</td></tr> +<tr><td></td><td>dictionary</td><td></td><td><a name="/a==1/b==2" class="target">/a 1/b 2</a></td><td></td></tr> +<tr><td></td><td>file</td><td></td><td></td><td></td></tr> +<tr><td></td><td>gstate</td><td></td><td></td><td>Level 2</td></tr> +<tr><td></td><td>lock</td><td></td><td></td><td>Display PostScript</td></tr> +<tr><td></td><td>packedarray</td><td></td><td></td><td>Level 2</td></tr> +<tr><td></td><td>string</td><td>Y</td><td>(hi) &lt;a33f&gt;</td><td></td></tr> +</tbody> +</table> + + +<p> +The following data types are implemented in WPS: +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">category</th><th scope="col">type</th><th scope="col">direct</th><th scope="col">literal</th><th scope="col">executable</th></tr> +</thead> +<tbody> +<tr><td>simple</td><td>boolean</td><td>Y</td><td>Y</td><td>-</td></tr> +<tr><td></td><td>number</td><td>Y</td><td>Y</td><td>-</td></tr> +<tr><td></td><td>mark</td><td>-</td><td>Y</td><td>-</td></tr> +<tr><td></td><td>name</td><td>-</td><td>Y</td><td>Y</td></tr> +<tr><td></td><td>null</td><td>Y</td><td>Y</td><td>-</td></tr> +<tr><td></td><td>operator</td><td>Y</td><td>-</td><td>Y</td></tr> +<tr><td>composite</td><td>array</td><td>Y</td><td>Y</td><td>-</td></tr> +<tr><td></td><td>proc</td><td>-</td><td>-</td><td>Y</td></tr> +<tr><td></td><td>dictionary</td><td>Y</td><td>Y</td><td>-</td></tr> +<tr><td></td><td>string</td><td>Y</td><td>Y</td><td>-</td></tr> +</tbody> +</table> + + +<p> +All the above types are represented directly in JavaScript except: +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">type</th><th scope="col">representation</th></tr> +</thead> +<tbody> +<tr><td>mark</td><td>unique object</td></tr> +<tr><td>literal name</td><td>quoted symbol</td></tr> +<tr><td>executable name</td><td>unquoted symbol</td></tr> +<tr><td>operator</td><td>function</td></tr> +<tr><td>proc</td><td>quoted array</td></tr> +</tbody> +</table> + + +<p> +The interpreter needs to understand when to evaluate an argument. The +distinction between a "literal" and "executable" is the key. For the +"proc" type, its origin from the Execution Stack is also important. +</p> +</div> + +</div> + +<div id="outline-container-2.6" class="outline-2"> +<h2 id="sec-2.6">Quoting and execution </h2> +<div class="outline-text-2" id="text-2.6"> + + +<p> +There are two important operators to control evaluation at the +PostScript language level. +</p> +<p> +The <a href="http://www.capcode.de/help/exec">exec</a> operator usually leaves the argument as is except: +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">type</th><th scope="col">result</th></tr> +</thead> +<tbody> +<tr><td>executable name</td><td>exec value</td></tr> +<tr><td>operator</td><td>apply operator</td></tr> +<tr><td>proc</td><td>exec each element</td></tr> +</tbody> +</table> + + +<p> +The <a href="http://www.capcode.de/help/cvx">cvx</a> operator makes the argument "executable". Usually +leaves the argument as is except: +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">from</th><th scope="col">to</th><th scope="col">how</th></tr> +</thead> +<tbody> +<tr><td>literal name</td><td>executable name</td><td>unquote</td></tr> +<tr><td>array</td><td>proc</td><td>quote</td></tr> +<tr><td>string</td><td>proc</td><td>~ parse</td></tr> +</tbody> +</table> + + +<p> +The ~ (tilde) character in the above table means that the +functionality has not been implemented yet. +</p> +</div> +</div> + +</div> + +<div id="outline-container-3" class="outline-1"> +<h1 id="sec-3">Drawing with PostScript </h1> +<div class="outline-text-1" id="text-3"> + + +<p> +As a convention, operators beginning with dot are non-standard, low +level operators which are subject to change. +</p> +<p> +There is a difference in how HTML 5 canvas, PostScript and PDF measure +angles: +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">language/device</th><th scope="col">unit</th></tr> +</thead> +<tbody> +<tr><td>canvas</td><td>rad</td></tr> +<tr><td>PostScript</td><td>deg</td></tr> +<tr><td>PDF</td><td>rad</td></tr> +</tbody> +</table> + + +<p> +Many of the examples below set up their bounding box using the +<code>.gbox</code> operator, e.g. +</p> + + + +<pre class="src src-ps">0 0 180 180 .gbox +</pre> + + + + +<p> +Only the width and height of the canvas clipping rectangle are taken +into account so far. The width and height is related to the drawing +units rather than to the size of the canvas element. +</p> +<p> +Both PostScript and PDF documents have the origin of the coordinate +system in the bottom left corner while HTML 5 canvas in the top left +corner. Thus, some of the following pictures are displayed upside +down unless an explicit coordinate transformation was added. This +discrepancy between the origin of the coordinate system is a problem +when drawing text because a simple coordinate transformation on its +own would draw the text upside-down. +</p> + +</div> + +<div id="outline-container-3.1" class="outline-2"> +<h2 id="sec-3.1">Bowtie example </h2> +<div class="outline-text-2" id="text-3.1"> + + +<p> +See the <a href="https://developer.mozilla.org/en/drawing_graphics_with_canvas#section_6">original example</a> in JavaScript. +</p> + + +<canvas id="xbowtie"></canvas> +<div id="bowtie"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the JavaScript example from</span> +<span style="color: #cd0000;">% https://developer.mozilla.org/en/drawing_graphics_with_canvas#section_6</span> + +0 0 180 180 .gbox + +<span style="color: #0000cd; font-weight: bold;">/bowtie</span> { <span style="color: #cd0000;">% fillStyle --</span> + 200 200 200 0.3 .rgba .setFillStyle + -30 -30 60 60 rectfill + .setFillStyle 1.0 .setGlobalAlpha + newpath + 25 25 moveto + -25 -25 lineto + 25 -25 lineto + -25 25 lineto + closepath + fill +} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +<span style="color: #0000cd; font-weight: bold;">/bowtieDot</span> { <span style="color: #cd0000;">% --</span> + 0 0 0 setrgbcolor + -2 -2 4 4 rectfill +} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +<span style="color: #0000cd; font-weight: bold;">/bowtie1</span> { <span style="color: #cd0000;">% fillStyle angle x y --</span> + <span style="color: #00cdcd; font-weight: bold;">gsave</span> + translate + rotate + bowtie + bowtieDot + <span style="color: #00cdcd; font-weight: bold;">grestore</span> +} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +45 45 translate +<span style="color: #008b00;">(red)</span> 0 0 0 bowtie1 +<span style="color: #008b00;">(green)</span> 45 85 0 bowtie1 +<span style="color: #008b00;">(blue)</span> 135 0 85 bowtie1 +<span style="color: #008b00;">(yellow)</span> 90 85 85 bowtie1 +</pre> + + + +</div> +<script>wps.parse("save (xbowtie) .setGc", $$("bowtie"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-3.2" class="outline-2"> +<h2 id="sec-3.2">Analog clock example </h2> +<div class="outline-text-2" id="text-3.2"> + + +<p> +See the <a href="http://oreilly.com/openbook/cgi/ch06_02.html">original example</a>. +</p> +<p> +Click on the clock to start/stop it. (If using Chrome, you might need +to reload the page for this to work. Not sure why?) +</p> + + +<canvas id="xclock2"></canvas> + +<div id="clock2"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the PostScript example from</span> +<span style="color: #cd0000;">% http://oreilly.com/openbook/cgi/ch06_02.html</span> + +0 0 150 150 .gbox +0 150 translate +1 -1 scale + +<span style="color: #0000cd; font-weight: bold;">/max</span> 150 <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/width</span> 1.5 <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/marker</span> 5 <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/origin</span> {0 0} <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/center</span> {max 2 div} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/radius</span> <span style="color: #cdcd00;">/center</span> load <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/hsegment</span> 0.50 radius mul <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/msegment</span> 0.80 radius mul <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/ssegment</span> 0.90 radius mul <span style="color: #00cdcd; font-weight: bold;">def</span> + +<span style="color: #0000cd; font-weight: bold;">/yellow</span> {1 1 0 setrgbcolor} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/red</span> {1 0 0 setrgbcolor} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/green</span> {0 1 0 setrgbcolor} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/blue</span> {0 0 1 setrgbcolor} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/black</span> {0 0 0 setrgbcolor} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +<span style="color: #0000cd; font-weight: bold;">/hangle</span> {<span style="color: #cdcd00;">/$h</span> load 60 mul <span style="color: #cdcd00;">/$m</span> load add 2 div neg .deg2rad} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/mangle</span> {<span style="color: #cdcd00;">/$m</span> load 6 mul neg .deg2rad} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/sangle</span> {<span style="color: #cdcd00;">/$s</span> load 6 mul neg .deg2rad} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +<span style="color: #0000cd; font-weight: bold;">/hand</span> { <span style="color: #cd0000;">% segment angle color width --</span> + origin moveto + width mul setlinewidth + load <span style="color: #00cdcd; font-weight: bold;">exec</span> + 2 copy cos mul + 3 1 roll sin mul + lineto stroke +} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +<span style="color: #0000cd; font-weight: bold;">/draw</span> { + <span style="color: #cdcd00;">/$h</span> .date <span style="color: #008b00;">(getHours)</span> 0 .call <span style="color: #00cdcd; font-weight: bold;">def</span> + <span style="color: #cdcd00;">/$m</span> .date <span style="color: #008b00;">(getMinutes)</span> 0 .call <span style="color: #00cdcd; font-weight: bold;">def</span> + <span style="color: #cdcd00;">/$s</span> .date <span style="color: #008b00;">(getSeconds)</span> 0 .call <span style="color: #00cdcd; font-weight: bold;">def</span> + <span style="color: #00cdcd; font-weight: bold;">gsave</span> + width setlinewidth + black clippath fill <span style="color: #cd0000;">% background</span> + center dup translate + 90 rotate + <span style="color: #00cdcd; font-weight: bold;">gsave</span> <span style="color: #cd0000;">% markers</span> + 12 { + radius marker sub 0 moveto + marker 0 rlineto red stroke + 360 12 div rotate + } <span style="color: #00cdcd; font-weight: bold;">repeat</span> + <span style="color: #00cdcd; font-weight: bold;">grestore</span> + newpath origin radius 0 360 arc blue stroke <span style="color: #cd0000;">% circle</span> + hsegment hangle <span style="color: #cdcd00;">/green</span> 2 hand <span style="color: #cd0000;">% hour</span> + msegment mangle <span style="color: #cdcd00;">/green</span> 1 hand <span style="color: #cd0000;">% minute</span> + ssegment sangle <span style="color: #cdcd00;">/yellow</span> 0.5 hand <span style="color: #cd0000;">% second</span> + origin width 2 mul 0 360 arc red fill <span style="color: #cd0000;">% dot</span> + <span style="color: #00cdcd; font-weight: bold;">grestore</span> +} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +draw + +<span style="color: #0000cd; font-weight: bold;">/timer</span> <span style="color: #00cdcd; font-weight: bold;">false</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/go</span> {{draw} .callback 1000 .setInterval <span style="color: #cdcd00;">/timer</span> exch <span style="color: #00cdcd; font-weight: bold;">def</span>} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/halt</span> {<span style="color: #cdcd00;">/timer</span> load .clearTimeout <span style="color: #cdcd00;">/timer</span> <span style="color: #00cdcd; font-weight: bold;">false</span> <span style="color: #00cdcd; font-weight: bold;">def</span>} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/callback</span> {<span style="color: #cdcd00;">/timer</span> load type <span style="color: #008b00;">(booleantype)</span> eq {go} {halt} <span style="color: #00cdcd; font-weight: bold;">ifelse</span>} <span style="color: #00cdcd; font-weight: bold;">bind</span> <span style="color: #00cdcd; font-weight: bold;">def</span> + +.gcanvas <span style="color: #008b00;">(onclick)</span> <span style="color: #cdcd00;">/callback</span> load .callback .hook +</pre> + + + +</div> +<script>(new Wps).parse($$("wps"), "(xclock2) .setGc", $$("clock2"));</script> + +<p> +Running the clock keeps the CPU noticeably busy. Chrome is best with +very little overhead. Firefox and Opera perform significantly worse. +WPS seems to be fast enough for one-off drawings, but its usability +depends on the efficiency of the host JavaScript interpreter when +running the interpreter in a tight loop. +</p> +</div> + +</div> + +<div id="outline-container-3.3" class="outline-2"> +<h2 id="sec-3.3">Fill example </h2> +<div class="outline-text-2" id="text-3.3"> + + +<p> +See the <a href="https://developer.mozilla.org/samples/canvas-tutorial/4_1_canvas_fillstyle.html">original example</a> in JavaScript. +</p> + + +<canvas id="xfill"></canvas> +<div id="fill"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the JavaScript example from</span> +<span style="color: #cd0000;">% https://developer.mozilla.org/samples/canvas-tutorial/4_1_canvas_fillstyle.html</span> + +<span style="color: #0000cd; font-weight: bold;">/n</span> 5 <span style="color: #00cdcd; font-weight: bold;">def</span> +<span style="color: #0000cd; font-weight: bold;">/w</span> 25 <span style="color: #00cdcd; font-weight: bold;">def</span> + +0 0 n w mul dup .gbox + +4 <span style="color: #00cdcd; font-weight: bold;">dict</span> <span style="color: #00cdcd; font-weight: bold;">begin</span> + 0 1 n { + <span style="color: #cdcd00;">/i</span> exch <span style="color: #00cdcd; font-weight: bold;">def</span> + <span style="color: #cdcd00;">/ii</span> 1 1 n div i mul sub <span style="color: #00cdcd; font-weight: bold;">def</span> + 0 1 n { + <span style="color: #cdcd00;">/j</span> exch <span style="color: #00cdcd; font-weight: bold;">def</span> + <span style="color: #cdcd00;">/jj</span> 1 1 n div j mul sub <span style="color: #00cdcd; font-weight: bold;">def</span> + ii jj 0 setrgbcolor + w j mul w i mul w w rectfill + } <span style="color: #00cdcd; font-weight: bold;">for</span> + } <span style="color: #00cdcd; font-weight: bold;">for</span> +<span style="color: #00cdcd; font-weight: bold;">end</span> +</pre> + + + +</div> +<script>wps.parse("save (xfill) .setGc", $$("fill"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-3.4" class="outline-2"> +<h2 id="sec-3.4">Tiger example </h2> +<div class="outline-text-2" id="text-3.4"> + + +<p> +The <a href="http://svn.ghostscript.com/viewvc/trunk/gs/examples/tiger.eps?view=co">original example</a> is included with <a href="http://ghostscript.com/">Ghostscript</a>. +</p> + + +<canvas id="xtiger" style="width:283pt;height:369pt"> +</canvas> +<p>Drawing took <span id="msg">--</span> seconds.</p> + +<div id="tiger" style="display:none"> + +<pre class="src src-text">%!PS-Adobe-2.0 EPSF-1.2 +%%Creator: Adobe Illustrator(TM) 1.2d4 +%%For: OpenWindows Version 2 +%%Title: tiger.eps +%%CreationDate: 4/12/90 3:20 AM +%%DocumentProcSets: Adobe_Illustrator_1.2d1 0 0 +%%DocumentSuppliedProcSets: Adobe_Illustrator_1.2d1 0 0 +%%BoundingBox: 17 171 567 739 +%%EndComments +/tigersave save def % prevent residual side effects + +%%BeginProcSet:Adobe_Illustrator_1.2d1 0 0 + +/Adobe_Illustrator_1.2d1 dup 100 dict def load begin +% definition operators +/bdef {bind def} bind def +/ldef {load def} bdef +/xdef {exch def} bdef +% graphic state operators +/_K { 3 index add neg dup 0 lt {pop 0} if 3 1 roll } bdef +/_k /setcmybcolor where { + /setcmybcolor get +} { + { 1 sub 4 1 roll _K _K _K setrgbcolor pop } bind +} ifelse def +/g {/_b xdef /p {_b setgray} def} bdef +/G {/_B xdef /P {_B setgray} def} bdef +/k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef +/K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef +/d /setdash ldef +/_i currentflat def +/i {dup 0 eq {pop _i} if setflat} bdef +/j /setlinejoin ldef +/J /setlinecap ldef +/M /setmiterlimit ldef +/w /setlinewidth ldef +% path construction operators +/_R {.25 sub round .25 add} bdef +/_r {transform _R exch _R exch itransform} bdef +/c {_r curveto} bdef +/C /c ldef +/v {currentpoint 6 2 roll _r curveto} bdef +/V /v ldef +/y {_r 2 copy curveto} bdef +/Y /y ldef +/l {_r lineto} bdef +/L /l ldef +/m {_r moveto} bdef +% path painting operators +/n /newpath ldef +/N /n ldef +/F {p fill} bdef +/f {closepath F} bdef +/S {P stroke} bdef +/s {closepath S} bdef +/B {gsave F grestore S} bdef +/b {closepath B} bdef +end +%%EndProcSet +%%EndProlog + +%%Page: 1 1 + +Adobe_Illustrator_1.2d1 begin + +.8 setgray +clippath fill +-110 -300 translate +1.1 dup scale + +0 g +0 G +0 i +0 J +0 j +0.172 w +10 M +[]0 d +0 0 0 0 k + +177.696 715.715 m +177.797 713.821 176.973 713.84 v +176.149 713.859 159.695 761.934 139.167 759.691 C +156.95 767.044 177.696 715.715 V +b +181.226 718.738 m +180.677 716.922 179.908 717.221 v +179.14 717.519 180.023 768.325 159.957 773.199 C +179.18 774.063 181.226 718.738 V +b +208.716 676.41 m +210.352 675.45 209.882 674.773 v +209.411 674.096 160.237 686.898 150.782 668.541 C +154.461 687.428 208.716 676.41 V +b +205.907 666.199 m +207.763 665.803 207.529 665.012 v +207.296 664.221 156.593 660.879 153.403 640.478 C +150.945 659.563 205.907 666.199 V +b +201.696 671.724 m +203.474 671.061 203.128 670.313 v +202.782 669.565 152.134 673.654 146.002 653.936 C +146.354 673.175 201.696 671.724 V +b +190.991 689.928 m +192.299 688.554 191.66 688.033 v +191.021 687.512 147.278 713.366 133.131 698.324 C +141.872 715.467 190.991 689.928 V +b +183.446 685.737 m +184.902 684.52 184.326 683.929 v +183.75 683.339 137.362 704.078 125.008 687.531 C +131.753 705.553 183.446 685.737 V +b +180.846 681.665 m +182.454 680.657 181.964 679.994 v +181.474 679.331 132.692 693.554 122.709 675.478 C +126.934 694.251 180.846 681.665 V +b +191.58 681.051 m +192.702 679.52 192.001 679.085 v +191.3 678.65 151.231 709.898 135.273 696.793 C +146.138 712.674 191.58 681.051 V +b +171.8 710 m +172.4 708.2 171.6 708 v +170.8 707.8 142.2 749.8 122.999 742.2 C +138.2 754 171.8 710 V +b +172.495 703.021 m +173.47 701.392 172.731 701.025 v +171.993 700.657 135.008 735.501 117.899 723.939 C +130.196 738.739 172.495 703.021 V +b +172.38 698.651 m +173.502 697.12 172.801 696.685 v +172.1 696.251 132.031 727.498 116.073 714.393 C +126.938 730.274 172.38 698.651 V +b +0 J 1 w +170.17 696.935 m +170.673 690.887 171.661 684.318 173.4 681.199 C +169.8 668.799 178.6 655.599 V +178.2 648.399 179.8 645.199 V +183.8 636.799 188.6 635.999 v +192.484 635.352 201.207 632.283 211.068 630.879 c +228.2 616.799 225 603.999 V +224.6 587.599 221 585.999 V +232.6 597.199 223 580.399 V +218.6 561.599 l +244.2 583.199 228.6 564.799 V +218.6 538.799 l +238.2 557.199 231 548.799 V +227.8 539.999 l +271 567.199 240.2 537.599 V +248.2 541.199 252.6 538.399 V +259.4 539.599 258.6 537.999 V +237.8 527.599 234.2 509.199 V +242.6 519.199 239.4 508.399 V +239.8 496.799 l +243.8 518.399 243.4 480.799 V +262.6 498.799 251 477.999 V +251 461.199 l +266.2 477.599 259.8 464.799 V +269.8 473.599 265.8 458.399 V +265 447.999 269.4 459.199 V +285.4 489.799 279.4 463.599 V +278.6 444.399 283.4 459.199 V +283.8 448.799 293 441.599 V +291.8 492.399 304.6 456.399 V +308.6 439.999 l +311.4 449.199 311 454.399 V +325.8 470.799 319 446.399 V +334.2 469.199 331 455.999 V +323.4 439.999 325 435.199 V +341.8 469.999 343 471.599 V +341 429.198 351.8 465.199 V +357.4 453.199 354.6 448.799 V +362.6 456.799 361.8 459.999 V +366.4 468.199 369.2 454.599 V +371 445.199 372.6 448.399 V +376.6 424.398 377.8 447.199 V +379.4 460.799 372.2 472.399 V +373 475.599 370.2 479.599 v +383.8 457.999 376.6 486.799 V +387.801 478.799 389.001 478.799 V +375.4 501.999 384.2 497.199 V +379 507.599 397.001 495.599 V +381 511.599 398.601 501.999 V +406.601 495.599 399.001 505.599 V +384.6 521.599 406.601 503.599 V +418.201 487.199 419.001 484.399 V +409.001 513.599 404.601 516.399 V +413.001 552.799 454.201 537.199 V +461.001 519.999 465.401 538.399 V +478.201 544.799 489.401 517.199 V +493.401 530.799 492.601 533.599 V +499.401 532.399 498.601 533.599 V +511.801 529.199 513.001 529.999 V +519.801 523.199 520.201 526.799 V +529.401 523.999 527.401 527.599 V +536.201 511.999 536.601 508.399 V +539.001 522.399 l +541.001 519.599 l +542.601 527.199 541.801 528.399 v +541.001 529.599 561.801 521.599 566.601 500.799 C +568.601 492.399 l +574.601 507.199 573.001 511.199 V +578.201 510.399 578.601 505.999 V +582.601 529.199 577.801 535.199 V +582.201 535.999 583.401 532.399 V +583.401 539.599 l +590.601 538.799 590.601 541.199 V +595.001 545.199 597.001 540.399 V +584.601 575.599 603.001 556.399 V +610.201 545.599 606.601 564.399 v +603.001 583.199 599.001 584.799 603.801 585.199 C +604.601 588.799 602.601 590.399 v +600.601 591.999 603.801 590.399 y +608.601 586.399 603.401 608.399 V +609.801 606.799 597.801 635.999 V +600.601 638.399 596.601 646.799 V +604.601 642.399 607.401 643.999 V +607.001 645.599 603.801 649.599 V +582.201 704.4 602.601 682.399 V +614.451 668.849 608.051 691.649 V +598.94 715.659 599.717 719.955 V +170.17 696.935 l +b +0.2 0.55 0.85 0 k +599.717 719.755 m +600.345 719.574 602.551 718.45 603.801 716.8 C +610.601 706 605.401 724.4 V +596.201 753.2 605.001 742 V +611.001 734.8 607.801 748.4 v +603.936 764.827 601.401 771.2 y +613.001 766.4 586.201 806 V +595.001 802.4 l +575.401 842 553.801 847.2 V +545.801 853.2 l +584.201 891.2 571.401 928 V +564.601 933.2 555.001 924 V +548.601 919.2 542.601 920.8 V +511.801 919.6 509.801 919.6 v +507.801 919.6 473.001 956.8 407.401 939.2 C +402.201 937.2 397.801 938.4 V +379.4 954.4 330.6 931.6 v +320.6 929.6 319 929.6 v +317.4 929.6 314.6 929.6 306.6 923.2 c +298.6 916.8 298.2 916 296.2 914.4 C +279.8 903.2 275 902.4 V +263.4 896 259 886 V +255.4 884.8 l +253.8 877.6 253.4 876.4 V +248.6 872.8 247.8 867.2 V +239 861.2 239.4 856.8 V +237.8 851.6 237 846.8 V +229.8 842 230.6 839.2 V +223 825.2 224.2 818.4 V +217.8 818.8 215 816.4 V +214.2 811.6 212.6 811.2 V +209.8 810 212.2 806 V +210.6 803.2 210.2 801.6 V +211 798.8 206.6 793.2 V +200.2 774.4 202.2 769.2 V +202.6 764.4 199.8 762.8 V +196.2 763.2 204.6 751.2 V +205.4 750 202.2 747.6 V +185 744 182.6 727.6 V +169 712.8 169 707.6 v +169 705.295 169.271 702.148 169.97 697.535 C +169.4 689.199 197 688.399 v +224.6 687.599 599.717 719.755 Y +b +184.4 697.4 m +159.4 736.8 173.8 680.399 Y +182.6 645.999 312.2 683.599 y +481.001 714 492.201 718 v +503.401 722 598.601 715.6 y +593.001 732.4 L +528.201 778.8 509.001 755.6 495.401 759.6 c +481.801 763.6 484.201 754 481.001 753.2 c +477.801 752.4 438.601 777.2 432.201 776.4 c +425.801 775.6 400.459 799.351 415.401 767.6 c +431.401 733.6 357 728.4 340.2 739.6 c +323.4 750.8 347.4 721.2 Y +365.8 701.2 331.4 718 y +297 730.8 273 705.2 269.8 704.4 c +266.6 703.6 261.8 700.4 261 706.8 c +260.2 713.2 252.69 729.901 221 703.6 c +201 686.999 187.2 709 Y +184.4 697.4 L +f +0.09 0.5 0.772 0 k +433.51 774.654 m +427.11 773.854 401.743 797.593 416.71 765.854 c +433.31 730.654 358.31 726.654 341.51 737.854 c +324.709 749.054 348.71 719.454 Y +367.11 699.454 332.709 716.254 y +298.309 729.054 274.309 703.454 271.109 702.654 c +267.909 701.854 263.109 698.654 262.309 705.054 c +261.509 711.454 254.13 727.988 222.309 701.854 c +201.073 684.508 187.582 705.963 Y +184.382 695.854 L +159.382 735.654 174.454 677.345 Y +183.255 642.944 313.509 681.854 y +482.31 712.254 493.51 716.254 v +504.71 720.254 599.038 713.927 y +593.51 731.236 L +528.71 777.636 510.31 753.854 496.71 757.854 c +483.11 761.854 485.51 752.254 482.31 751.454 c +479.11 750.654 439.91 775.454 433.51 774.654 c +f +0.081 0.45 0.695 0 k +434.819 772.909 m +428.419 772.109 403.685 796.138 418.019 764.109 c +434.219 727.908 359.619 724.908 342.819 736.108 c +326.019 747.308 350.019 717.708 Y +368.419 697.708 334.019 714.508 y +299.619 727.308 275.618 701.708 272.418 700.908 c +269.218 700.108 264.418 696.908 263.618 703.308 c +262.818 709.708 255.57 726.075 223.618 700.108 c +201.145 682.017 187.964 702.926 Y +184.364 694.308 L +160.564 733.308 175.109 674.29 Y +183.909 639.89 314.819 680.108 y +483.619 710.508 494.819 714.508 v +506.019 718.508 599.474 712.254 y +594.02 730.072 L +529.219 776.472 511.619 752.109 498.019 756.109 c +484.419 760.109 486.819 750.509 483.619 749.708 c +480.419 748.908 441.219 773.709 434.819 772.909 c +f +0.072 0.4 0.618 0 k +436.128 771.163 m +429.728 770.363 404.999 794.395 419.328 762.363 c +436.128 724.807 360.394 723.518 344.128 734.363 c +327.328 745.563 351.328 715.963 Y +369.728 695.963 335.328 712.763 y +300.928 725.563 276.928 699.963 273.728 699.163 c +270.528 698.363 265.728 695.163 264.928 701.563 c +264.128 707.963 257.011 724.161 224.927 698.363 c +201.218 679.526 188.345 699.89 Y +184.345 692.763 L +162.545 729.563 175.764 671.235 Y +184.564 636.835 316.128 678.363 y +484.928 708.763 496.129 712.763 v +507.329 716.763 599.911 710.581 y +594.529 728.908 L +529.729 775.309 512.929 750.363 499.329 754.363 c +485.728 758.363 488.128 748.763 484.928 747.963 c +481.728 747.163 442.528 771.963 436.128 771.163 c +f +0.063 0.35 0.54 0 k +437.438 769.417 m +431.037 768.617 406.814 792.871 420.637 760.617 c +437.438 721.417 362.237 721.417 345.437 732.617 c +328.637 743.817 352.637 714.217 Y +371.037 694.217 336.637 711.017 y +302.237 723.817 278.237 698.217 275.037 697.417 c +271.837 696.617 267.037 693.417 266.237 699.817 c +265.437 706.217 258.452 722.248 226.237 696.617 c +201.291 677.035 188.727 696.854 Y +184.327 691.217 L +164.527 726.018 176.418 668.181 Y +185.218 633.78 317.437 676.617 y +486.238 707.017 497.438 711.017 v +508.638 715.017 600.347 708.908 y +595.038 727.745 L +530.238 774.145 514.238 748.617 500.638 752.617 c +487.038 756.617 489.438 747.017 486.238 746.217 c +483.038 745.417 443.838 770.217 437.438 769.417 c +f +0.054 0.3 0.463 0 k +438.747 767.672 m +432.347 766.872 406.383 790.323 421.947 758.872 c +441.147 720.072 363.546 719.672 346.746 730.872 c +329.946 742.072 353.946 712.472 Y +372.346 692.472 337.946 709.272 y +303.546 722.072 279.546 696.472 276.346 695.672 c +273.146 694.872 268.346 691.672 267.546 698.072 c +266.746 704.472 259.892 720.335 227.546 694.872 c +201.364 674.544 189.109 693.817 Y +184.309 689.672 L +166.309 722.872 177.073 665.126 Y +185.873 630.726 318.746 674.872 y +487.547 705.272 498.747 709.272 v +509.947 713.272 600.783 707.236 y +595.547 726.581 L +530.747 772.981 515.547 746.872 501.947 750.872 c +488.347 754.872 490.747 745.272 487.547 744.472 c +484.347 743.672 445.147 768.472 438.747 767.672 c +f +0.045 0.25 0.386 0 k +440.056 765.927 m +433.655 765.127 407.313 788.387 423.255 757.127 c +443.656 717.126 364.855 717.926 348.055 729.126 c +331.255 740.326 355.255 710.726 Y +373.655 690.726 339.255 707.526 y +304.855 720.326 280.855 694.726 277.655 693.926 c +274.455 693.126 269.655 689.926 268.855 696.326 c +268.055 702.726 261.332 718.422 228.855 693.126 c +201.436 672.053 189.491 690.781 Y +184.291 688.126 L +168.291 718.326 177.727 662.071 Y +186.527 627.671 320.055 673.126 y +488.856 703.526 500.056 707.526 v +511.256 711.526 601.22 705.563 y +596.056 725.417 L +531.256 771.817 516.856 745.126 503.256 749.126 c +489.656 753.127 492.056 743.526 488.856 742.726 c +485.656 741.926 446.456 766.727 440.056 765.927 c +f +0.036 0.2 0.309 0 k +441.365 764.181 m +434.965 763.381 407.523 786.056 424.565 755.381 c +446.565 715.781 366.164 716.181 349.364 727.381 c +332.564 738.581 356.564 708.981 Y +374.964 688.981 340.564 705.781 y +306.164 718.581 282.164 692.981 278.964 692.181 c +275.764 691.381 270.964 688.181 270.164 694.581 c +269.364 700.981 262.773 716.508 230.164 691.381 c +201.509 669.562 189.873 687.744 Y +184.273 686.581 L +169.872 714.981 178.382 659.017 Y +187.182 624.616 321.364 671.381 y +490.165 701.781 501.365 705.781 v +512.565 709.781 601.656 703.89 y +596.565 724.254 L +531.765 770.654 518.165 743.381 504.565 747.381 c +490.965 751.381 493.365 741.781 490.165 740.981 c +486.965 740.181 447.765 764.981 441.365 764.181 c +f +0.027 0.15 0.231 0 k +442.674 762.435 m +436.274 761.635 408.832 784.311 425.874 753.635 c +447.874 714.035 367.474 714.435 350.674 725.635 c +333.874 736.835 357.874 707.235 Y +376.274 687.235 341.874 704.035 y +307.473 716.835 283.473 691.235 280.273 690.435 c +277.073 689.635 272.273 686.435 271.473 692.835 c +270.673 699.235 264.214 714.595 231.473 689.635 c +201.582 667.071 190.255 684.707 Y +184.255 685.035 L +170.654 711.436 179.037 655.962 Y +187.837 621.562 322.673 669.635 y +491.474 700.035 502.674 704.035 v +513.874 708.035 602.093 702.217 y +597.075 723.09 L +532.274 769.49 519.474 741.635 505.874 745.635 c +492.274 749.635 494.674 740.035 491.474 739.235 c +488.274 738.435 449.074 763.235 442.674 762.435 c +f +0.018 0.1 0.154 0 k +443.983 760.69 m +437.583 759.89 410.529 782.777 427.183 751.89 c +449.183 711.09 368.783 712.69 351.983 723.89 c +335.183 735.09 359.183 705.49 Y +377.583 685.49 343.183 702.29 y +308.783 715.09 284.783 689.49 281.583 688.69 c +278.382 687.89 273.582 684.69 272.782 691.09 c +271.982 697.49 265.654 712.682 232.782 687.89 c +201.655 664.58 190.637 681.671 Y +184.236 683.49 L +171.236 707.49 179.691 652.907 Y +188.491 618.507 323.983 667.89 y +492.783 698.29 503.983 702.29 v +515.183 706.29 602.529 700.544 y +597.583 721.926 L +532.783 768.327 520.783 739.89 507.183 743.89 c +493.583 747.89 495.983 738.29 492.783 737.49 c +489.583 736.69 450.383 761.49 443.983 760.69 c +f +0.009 0.05 0.077 0 k +445.292 758.945 m +438.892 758.145 412.917 781.589 428.492 750.145 c +449.692 707.344 370.092 710.944 353.292 722.144 c +336.492 733.344 360.492 703.744 Y +378.892 683.744 344.492 700.544 y +310.092 713.344 286.092 687.744 282.892 686.944 c +279.692 686.144 274.892 682.944 274.092 689.344 c +273.292 695.744 267.095 710.768 234.092 686.144 c +201.727 662.089 191.018 678.635 Y +184.218 681.944 L +171.418 705.144 180.346 649.853 Y +189.146 615.453 325.292 666.144 y +494.093 696.544 505.293 700.544 v +516.493 704.544 602.965 698.872 y +598.093 720.763 L +533.292 767.163 522.093 738.144 508.493 742.144 c +494.893 746.145 497.293 736.544 494.093 735.744 c +490.892 734.944 451.692 759.745 445.292 758.945 c +f +1 g +184.2 680.399 m +171.4 702.4 181 646.799 Y +189.8 612.399 326.6 664.399 y +495.401 694.8 506.601 698.8 v +517.801 702.8 603.401 697.2 y +598.601 719.6 L +533.801 766 523.401 736.4 509.801 740.4 c +496.201 744.4 498.601 734.8 495.401 734 c +492.201 733.2 453.001 758 446.601 757.2 c +440.201 756.4 414.981 780.207 429.801 748.4 c +452.028 700.693 369.041 710.773 354.6 720.4 c +337.8 731.6 361.8 702 Y +380.2 681.999 345.8 698.8 y +311.4 711.6 287.4 685.999 284.2 685.199 c +281 684.399 276.2 681.199 275.4 687.599 c +274.6 694 268.535 708.856 235.4 684.399 c +201.8 659.599 191.4 675.599 Y +184.2 680.399 L +f +0 g +225.8 650.399 m +218.6 638.799 239.4 625.599 V +240.8 624.199 222.8 628.399 V +216.6 630.399 215 640.799 V +210.2 645.199 205.4 650.799 v +200.6 656.399 225.8 650.399 y +f +0.8 g +365.8 698 m +383.498 671.179 382.9 666.399 v +381.6 655.999 381.4 646.399 384.6 642.399 c +387.801 638.399 396.601 605.199 y +396.201 603.999 408.601 641.999 V +420.201 657.999 400.201 676.399 V +365 705.2 365.8 698 v +f +0 g +1 J 0.1 w +245.8 623.599 m +257 616.399 242.6 585.199 V +249 587.599 l +248.2 576.399 245 573.999 V +252.2 577.199 l +257 569.199 253 564.399 V +269.8 556.399 269 549.999 V +275.4 557.999 271.4 564.399 v +267.4 570.799 260.2 566.799 261 585.199 C +252.2 581.999 l +257.8 590.799 257.8 597.199 V +249.8 594.799 l +265.269 621.377 254.6 622.799 v +248.6 623.599 245.8 623.599 Y +f +0.8 g +278.2 606.799 m +281 611.199 278.2 610.399 v +275.4 609.599 244.2 594.799 238.2 585.199 C +272.6 609.599 278.2 606.799 V +f +288.6 598.799 m +291.4 603.199 288.6 602.399 v +285.8 601.599 254.6 586.799 248.6 577.199 C +283 601.599 288.6 598.799 V +f +301.8 613.999 m +304.6 618.399 301.8 617.599 v +299 616.799 267.8 601.999 261.8 592.399 C +296.2 616.799 301.8 613.999 V +f +278.6 570.399 m +278.6 576.399 275.8 575.599 v +273 574.799 237 557.199 231 547.599 C +273 573.199 278.6 570.399 V +f +279.8 581.199 m +281 585.999 278.2 585.199 V +276.2 585.199 249.8 573.599 243.8 563.999 C +273.4 585.599 279.8 581.199 V +f +265.4 533.599 m +255.4 525.999 l +265.8 533.599 269.4 532.399 V +262.6 521.199 261.8 515.999 V +272.2 528.799 277.8 528.399 V +285.4 527.999 285.4 517.199 V +291 527.599 294.2 527.199 V +295.4 520.799 294.2 513.999 V +298.2 521.599 302.2 519.999 V +308.6 521.999 307.8 510.399 V +307.8 499.999 307 497.199 V +312.6 523.599 315 523.999 V +323 525.199 327.8 516.399 V +323.8 523.999 328.6 521.999 V +339.4 520.399 342.6 513.599 V +335.8 525.599 341.4 522.399 V +348.2 522.399 349.4 515.999 V +357.8 494.799 359.8 493.199 V +352.2 514.799 353.8 514.799 V +351.8 526.799 357 511.999 V +353.8 525.999 359.4 525.199 v +365 524.399 369.4 514.399 377.8 516.799 C +387.401 511.199 389.401 580.399 V +265.4 533.599 L +f +0 g +0 J 1 w +270.2 626.399 m +285 632.399 325 626.399 V +332.2 625.999 339 634.799 v +345.8 643.599 372.6 650.799 379 648.799 C +388.601 642.399 l +389.401 641.199 l +401.801 630.799 402.201 623.199 v +402.601 615.599 387.801 567.599 378.2 551.599 c +368.6 535.599 359 523.199 339.8 525.599 C +319 529.599 293.4 525.599 v +264.2 527.199 261.4 535.199 v +258.6 543.199 272.6 558.399 y +277 566.799 275.8 581.199 v +274.6 595.599 275 623.599 270.2 626.399 c +f +0.1 0.6 0.45 0 k +292.2 624.399 m +300.6 605.999 271 540.799 y +269 539.199 283.66 533.154 293.8 535.599 c +304.746 538.237 345 533.999 Y +368.6 549.599 381.4 593.999 y +391.801 617.999 374.2 621.199 v +356.6 624.399 292.2 624.399 y +f +0.1 0.6 0.45 0.2 k +290.169 593.503 m +293.495 606.293 295.079 618.094 292.2 624.399 c +354.6 617.999 365.8 638.799 v +370.041 646.674 384.801 615.999 384.4 606.399 c +321.4 591.999 306.6 603.199 V +290.169 593.503 L +f +0.1 0.6 0.45 0.25 k +294.6 577.199 m +296.6 569.999 294.2 565.999 V +292.6 565.199 291.4 564.799 V +292.6 561.199 298.6 559.599 V +300.6 555.199 303 554.799 v +305.4 554.399 310.2 548.799 314.2 549.999 c +318.2 551.199 329.4 555.199 y +335 558.399 343.8 554.799 V +346.175 555.601 346.6 559.599 v +347.1 564.299 350.2 567.999 352.2 569.999 c +354.2 571.999 363.8 584.799 362.6 585.199 c +361.4 585.599 294.6 577.199 Y +f +0 0.55 0.5 0 k +290.2 625.599 m +287.4 603.199 290.6 594.799 v +293.8 586.399 293 584.399 292.2 580.399 c +291.4 576.399 295.8 566.399 301.4 560.399 C +313.4 558.799 l +328.6 562.399 337.8 559.599 V +346.794 558.256 350.2 573.199 V +355 579.599 362.2 582.399 v +369.4 585.199 376.6 626.799 372.6 634.799 c +368.6 642.799 354.2 647.199 338.2 631.599 c +322.2 615.999 320.2 632.799 290.2 625.599 C +b +0 0 0.2 0 k +0.5 w +291.8 550.799 m +291 552.799 286.6 553.199 V +264.2 556.799 255.8 569.199 V +249 574.799 253.4 563.199 V +263.8 542.799 270.6 539.999 V +287 535.999 291.8 550.799 V +b +0 0.55 0.5 0.2 k +1 w +371.742 614.771 m +372.401 622.677 374.354 631.291 372.6 634.799 c +366.154 647.693 349.181 642.305 338.2 631.599 c +322.2 615.999 320.2 632.799 290.2 625.599 C +288.455 611.636 289.295 601.624 v +326.6 613.199 327.4 607.599 V +329 610.799 338.2 610.799 v +347.4 610.799 370.142 611.971 371.742 614.771 C +f +0 g +0 0.55 0.5 0.35 K +2 w +328.6 624.799 m +333.4 619.999 329.8 610.399 V +315.4 594.399 317.4 580.399 v +S +0 0 0.2 0 k +0 G +0.5 w +280.6 539.999 m +276.2 552.799 285 545.999 V +289.8 543.999 288.6 542.399 v +287.4 540.799 281.8 536.799 280.6 539.999 C +b +285.64 538.799 m +282.12 549.039 289.16 543.599 V +293.581 541.151 292.04 540.719 v +287.48 539.439 292.04 536.879 285.64 538.799 C +b +290.44 538.799 m +286.92 549.039 293.96 543.599 V +298.335 541.289 296.84 540.719 v +293.48 539.439 296.84 536.879 290.44 538.799 C +b +297.04 538.599 m +293.52 548.839 300.56 543.399 V +304.943 541.067 303.441 540.519 v +300.48 539.439 303.441 536.679 297.04 538.599 C +b +303.52 538.679 m +300 548.919 307.041 543.479 V +310.881 541.879 309.921 540.599 v +308.961 539.319 309.921 536.759 303.52 538.679 C +b +310.2 537.999 m +305.4 550.399 314.6 543.999 V +319.4 541.999 318.2 540.399 v +317 538.799 318.2 535.599 310.2 537.999 C +b +0 g +0.1 0.6 0.45 0.25 K +2 w +281.8 555.199 m +295 557.999 301 554.799 V +307 553.599 308.2 553.999 v +309.4 554.399 312.6 554.799 y +S +315.8 546.399 m +327.8 559.999 339.8 555.599 v +346.816 553.026 345.8 556.399 346.6 559.199 c +347.4 561.999 347.6 566.199 352.6 569.199 c +S +0 0 0.2 0 k +0 G +0.5 w +333 562.399 m +329 573.199 326.2 560.399 v +323.4 547.599 320.2 543.999 318.6 541.199 C +318.6 535.999 327 536.399 V +337.8 536.799 338.2 539.599 v +338.6 542.399 337 553.999 333 562.399 C +b +0 g +0.1 0.6 0.45 0.25 K +2 w +347 555.199 m +350.6 557.599 353 556.399 v +S +353.5 571.599 m +356.4 576.499 361.2 577.299 v +S +0.7 g +0 G +1 w +274.2 534.799 m +292.2 531.599 296.6 533.199 V +305.4 533.199 297 531.199 V +284.2 531.199 276.2 532.399 V +264.6 537.999 274.2 534.799 V +f +0 0 0.2 0 k +0.5 w +288.2 627.999 m +305.8 627.999 307.8 627.199 V +315 596.399 311.4 588.799 V +310.2 585.999 307.4 591.599 V +289 624.399 285.8 626.399 v +282.6 628.399 287 627.999 288.2 627.999 C +b +211.1 630.699 m +220 628.999 232.6 626.399 V +237.4 603.999 240.6 599.199 v +243.8 594.399 240.2 594.399 236.6 597.199 c +233 599.999 218.2 613.999 216.2 618.399 c +214.2 622.799 211.1 630.699 y +b +232.961 626.182 m +238.761 624.634 239.77 622.419 v +240.778 620.205 238.568 616.908 y +237.568 613.603 236.366 615.765 v +235.164 617.928 232.292 625.588 232.961 626.182 c +b +0 g +233 626.399 m +236.6 621.199 240.2 621.199 v +243.8 621.199 244.182 621.612 247 620.999 c +251.6 619.999 251.2 621.999 257.8 620.799 c +260.44 620.319 263 621.199 265.8 619.999 c +268.6 618.799 271.8 619.599 273 621.599 c +274.2 623.599 279 627.799 Y +266.2 625.999 263.4 625.199 V +241 623.999 233 626.399 V +f +0 0 0.2 0 k +277.6 626.199 m +271.15 622.699 270.75 620.299 v +270.35 617.899 276 614.199 y +278.75 609.599 279.35 611.999 v +279.95 614.399 278.4 625.799 277.6 626.199 c +b +240.115 620.735 m +247.122 609.547 247.339 620.758 V +247.896 622.016 246.136 622.038 v +240.061 622.114 241.582 626.216 240.115 620.735 C +b +247.293 620.486 m +255.214 609.299 254.578 620.579 V +254.585 620.911 252.832 621.064 v +248.085 621.478 248.43 625.996 247.293 620.486 C +b +254.506 620.478 m +262.466 609.85 261.797 619.516 V +261.916 620.749 260.262 621.05 v +256.37 621.756 256.159 625.005 254.506 620.478 C +b +261.382 620.398 m +269.282 608.837 269.63 618.618 V +271.274 619.996 269.528 620.218 v +263.71 620.958 264.508 625.412 261.382 620.398 C +b +0 0 0.2 0.1 k +225.208 616.868 m +217.55 618.399 l +214.95 623.399 212.85 629.549 y +219.2 628.549 231.7 625.749 V +232.576 622.431 234.048 616.636 v +225.208 616.868 l +f +290.276 621.53 m +288.61 624.036 287.293 625.794 286.643 626.2 c +283.63 628.083 287.773 627.706 288.902 627.706 C +305.473 627.706 307.356 626.953 V +307.88 624.711 308.564 621.32 V +298.476 623.33 290.276 621.53 V +f +0.2 0.55 0.85 0 k +1 w +343.88 759.679 m +371.601 755.719 397.121 791.359 398.881 801.04 c +400.641 810.72 390.521 822.6 Y +391.841 825.68 387.001 839.76 381.721 849 c +376.441 858.24 360.54 857.266 343 858.24 c +327.16 859.12 308.68 835.8 307.36 834.04 c +306.04 832.28 312.2 793.999 313.52 788.279 c +314.84 782.559 312.2 756.159 y +346.44 765.259 316.16 763.639 343.88 759.679 c +f +0.08 0.44 0.68 0 k +308.088 833.392 m +306.792 831.664 312.84 794.079 314.136 788.463 c +315.432 782.847 312.84 756.927 y +345.512 765.807 316.728 764.271 343.944 760.383 c +371.161 756.495 396.217 791.487 397.945 800.992 c +399.673 810.496 389.737 822.16 Y +391.033 825.184 386.281 839.008 381.097 848.08 c +375.913 857.152 360.302 856.195 343.08 857.152 c +327.528 858.016 309.384 835.12 308.088 833.392 c +f +0.06 0.33 0.51 0 k +308.816 832.744 m +307.544 831.048 313.48 794.159 314.752 788.647 c +316.024 783.135 313.48 757.695 y +344.884 766.855 317.296 764.903 344.008 761.087 c +370.721 757.271 395.313 791.615 397.009 800.944 c +398.705 810.272 388.953 821.72 Y +390.225 824.688 385.561 838.256 380.473 847.16 c +375.385 856.064 360.063 855.125 343.16 856.064 c +327.896 856.912 310.088 834.44 308.816 832.744 c +f +0.04 0.22 0.34 0 k +309.544 832.096 m +308.296 830.432 314.12 794.239 315.368 788.831 c +316.616 783.423 314.12 758.463 y +343.556 767.503 317.864 765.535 344.072 761.791 c +370.281 758.047 394.409 791.743 396.073 800.895 c +397.737 810.048 388.169 821.28 Y +389.417 824.192 384.841 837.504 379.849 846.24 c +374.857 854.976 359.824 854.055 343.24 854.976 c +328.264 855.808 310.792 833.76 309.544 832.096 c +f +0.02 0.11 0.17 0 k +310.272 831.448 m +309.048 829.816 314.76 794.319 315.984 789.015 c +317.208 783.711 314.76 759.231 y +342.628 768.151 318.432 766.167 344.136 762.495 c +369.841 758.823 393.505 791.871 395.137 800.848 c +396.769 809.824 387.385 820.84 Y +388.609 823.696 384.121 836.752 379.225 845.32 c +374.329 853.888 359.585 852.985 343.32 853.888 c +328.632 854.704 311.496 833.08 310.272 831.448 c +f +1 g +344.2 763.2 m +369.4 759.6 392.601 792 394.201 800.8 c +395.801 809.6 386.601 820.4 Y +387.801 823.2 383.4 836 378.6 844.4 c +373.8 852.8 359.346 851.914 343.4 852.8 c +329 853.6 312.2 832.4 311 830.8 c +309.8 829.2 315.4 794.4 316.6 789.2 c +317.8 784 315.4 760 y +340.9 768.6 319 766.8 344.2 763.2 c +f +0.8 g +390.601 797.2 m +362.8 789.6 351.2 791.2 V +335.4 797.8 326.6 776 V +323 768.8 321 766.8 v +319 764.8 390.601 797.2 Y +f +0 g +394.401 799.4 m +365.4 787.2 355.4 787.6 v +339 792.2 330.6 777.6 V +322.2 768.4 319 766.8 V +318.6 765.2 325 769.2 V +335.4 764 l +350.2 754.4 359.8 770.4 V +363.8 781.6 363.8 783.6 v +363.8 785.6 385 791.2 386.601 791.6 c +388.201 792 394.801 796.2 394.401 799.4 C +f +0.4 0.2 0.8 0 k +347 763.486 m +340.128 763.486 331.755 767.351 331.755 773.6 c +331.755 779.848 340.128 786.113 347 786.113 c +353.874 786.113 359.446 781.048 359.446 774.8 c +359.446 768.551 353.874 763.486 347 763.486 c +f +0.4 0.2 0.8 0.2 k +343.377 780.17 m +338.531 779.448 333.442 777.945 333.514 778.161 c +335.054 782.78 341.415 786.113 347 786.113 c +351.296 786.113 355.084 784.135 357.32 781.125 c +352.004 781.455 343.377 780.17 v +f +1 g +355.4 780.4 m +351 783.6 351 781.4 V +354.6 777 355.4 780.4 V +f +0 g +345.4 772.274 m +342.901 772.274 340.875 774.3 340.875 776.8 c +340.875 779.299 342.901 781.325 345.4 781.325 c +347.9 781.325 349.926 779.299 349.926 776.8 c +349.926 774.3 347.9 772.274 345.4 772.274 c +f +0.2 0.55 0.85 0 k +241.4 785.6 m +238.2 806.8 240.6 811.2 V +251.4 821.2 251 824.8 V +250.6 842.8 249.4 843.6 v +248.2 844.4 240.6 850.4 234.6 844 C +224.2 826 225 819.6 V +225 817.6 l +217.4 818 215.8 816 V +214.6 810.8 213.4 810.4 V +210.6 808 212.6 805.2 V +210.6 802.8 211 798.8 V +218.6 794.8 L +220.6 780.4 231.4 775.2 v +236.236 772.871 239.4 779.6 241.4 785.6 c +f +1 g +240.4 787.44 m +237.52 806.52 239.68 810.48 V +249.4 819.48 249.04 822.72 V +248.68 838.92 247.6 839.64 v +246.52 840.36 239.68 845.76 234.28 840 C +224.92 823.8 225.64 818.04 V +225.64 816.24 l +218.8 816.6 217.36 814.8 V +216.28 810.12 215.2 809.76 V +212.68 807.6 214.48 805.08 V +212.68 802.92 213.04 799.32 V +219.88 795.72 L +221.68 782.76 231.4 778.08 v +235.752 775.985 238.6 782.04 240.4 787.44 c +f +0.075 0.412 0.637 0 k +248.95 842.61 m +247.86 843.47 240.37 849.24 234.52 843 C +224.38 825.45 225.16 819.21 V +225.16 817.26 l +217.75 817.65 216.19 815.7 V +215.02 810.63 213.85 810.24 V +211.12 807.9 213.07 805.17 V +211.12 802.83 211.51 798.93 V +218.92 795.03 L +220.87 780.99 231.4 775.92 v +236.114 773.65 239.2 780.21 241.15 786.06 c +238.03 806.73 240.37 811.02 V +250.9 820.77 250.51 824.28 V +250.12 841.83 248.95 842.61 V +f +0.05 0.275 0.425 0 k +248.5 841.62 m +247.52 842.54 240.14 848.08 234.44 842 C +224.56 824.9 225.32 818.82 V +225.32 816.92 l +218.1 817.3 216.58 815.4 V +215.44 810.46 214.3 810.08 V +211.64 807.8 213.54 805.14 V +211.64 802.86 212.02 799.06 V +219.24 795.26 L +221.14 781.58 231.4 776.64 v +235.994 774.428 239 780.82 240.9 786.52 c +237.86 806.66 240.14 810.84 V +250.4 820.34 250.02 823.76 V +249.64 840.86 248.5 841.62 V +f +0.025 0.137 0.212 0 k +248.05 840.63 m +247.18 841.61 239.91 846.92 234.36 841 C +224.74 824.35 225.48 818.43 V +225.48 816.58 l +218.45 816.95 216.97 815.1 V +215.86 810.29 214.75 809.92 V +212.16 807.7 214.01 805.11 V +212.16 802.89 212.53 799.19 V +219.56 795.49 L +221.41 782.17 231.4 777.36 v +235.873 775.206 238.8 781.43 240.65 786.98 c +237.69 806.59 239.91 810.66 V +249.9 819.91 249.53 823.24 V +249.16 839.89 248.05 840.63 V +f +1 g +240.4 787.54 m +237.52 806.52 239.68 810.48 V +249.4 819.48 249.04 822.72 V +248.68 838.92 247.6 839.64 V +246.84 840.68 239.68 845.76 234.28 840 C +224.92 823.8 225.64 818.04 V +225.64 816.24 l +218.8 816.6 217.36 814.8 V +216.28 810.12 215.2 809.76 V +212.68 807.6 214.48 805.08 V +212.68 802.92 213.04 799.32 V +219.88 795.72 L +221.68 782.76 231.4 778.08 v +235.752 775.985 238.6 782.14 240.4 787.54 c +f +0.8 g +237.3 793.8 m +215.7 804 214.8 804.8 V +223.9 796.6 224.7 796.6 v +225.5 796.6 237.3 793.8 Y +f +0 g +220.2 800 m +238.6 796.4 238.6 792 v +238.6 789.088 238.357 775.669 233 777.2 c +224.6 779.6 228.2 794 220.2 800 c +f +0.4 0.2 0.8 0 k +228.6 796.2 m +237.578 794.726 238.6 792 v +239.2 790.4 239.863 782.092 234.4 781 c +229.848 780.089 227.618 790.31 228.6 796.2 c +f +0 g +314.595 753.651 m +314.098 755.393 315.409 755.262 317.2 755.8 c +319.2 756.4 331.4 760.2 332.2 762.8 c +333 765.4 346.2 761 Y +348 760.2 352.4 757.6 Y +357.2 756.4 363.8 756 Y +366.2 755 369.6 752.2 Y +384.2 742 396.601 749.2 Y +416.601 755.8 410.601 773 Y +407.601 782 410.801 785.4 Y +411.001 789.2 418.201 782.8 Y +420.801 778.6 421.601 773.6 Y +429.601 762.4 426.201 780.2 Y +426.401 781.2 423.601 784.8 423.601 786 c +423.601 787.2 421.801 790.6 Y +418.801 794 421.201 801 Y +423.001 814.8 420.801 813 Y +419.601 814.8 410.401 804.8 Y +408.201 801.4 402.201 799.8 Y +399.401 798 396.001 799.4 Y +393.401 799.8 387.801 792.8 Y +390.601 793 393.001 788.6 395.401 788.4 c +397.801 788.2 399.601 790.8 401.201 791.4 c +402.801 792 405.601 786.2 Y +406.001 783.6 400.401 778.8 Y +400.001 774.2 398.401 775.8 Y +395.401 776.4 394.201 772.6 393.201 768 c +392.201 763.4 388.001 763 y +386.401 755.6 385.2 758.6 Y +385 764.2 379 758.4 Y +377.8 756.4 373.2 758.6 Y +366.4 760.6 368.8 762.6 Y +370.6 764.8 381.8 762.6 Y +384 764.2 376 768.2 Y +375.4 770 376.4 774.4 Y +377.6 777.6 384.4 783.2 Y +393.801 784.4 391.001 786 Y +384.801 791.2 379 783.6 Y +376.8 777.4 359.4 762.4 Y +354.6 759 357.2 765.8 353.2 762.4 c +349.2 759 328.6 768 y +317.038 769.193 314.306 753.451 310.777 756.571 c +316.195 748.051 314.595 753.651 v +f +509.401 920 m +483.801 912 481.001 893.2 V +478.601 870.4 499.001 852.8 V +499.401 846.4 501.401 843.2 v +499.801 838.4 518.601 846 V +545.801 854.4 l +552.201 856.8 557.401 865.6 v +562.601 874.4 577.801 893.2 574.201 918.4 C +575.401 929.6 569.401 930 V +561.001 931.6 553.801 924 V +547.001 920.8 544.601 921.2 V +509.401 920 L +f +564.022 920.99 m +566.122 929.92 561.282 925.08 V +554.242 919.36 546.761 919.36 V +532.241 917.16 527.841 903.96 V +523.881 877.12 531.801 871.4 V +536.641 863.92 543.681 870.52 v +550.722 877.12 566.222 907.35 564.022 920.99 C +f +0.2 g +563.648 920.632 m +565.738 929.376 560.986 924.624 V +554.074 919.008 546.729 919.008 V +532.473 916.848 528.153 903.888 V +524.265 877.536 532.041 871.92 V +536.793 864.576 543.705 871.056 v +550.618 877.536 565.808 907.24 563.648 920.632 C +f +0.4 g +563.274 920.274 m +565.354 928.832 560.69 924.168 V +553.906 918.656 546.697 918.656 V +532.705 916.536 528.465 903.816 V +524.649 877.952 532.281 872.44 V +536.945 865.232 543.729 871.592 v +550.514 877.952 565.394 907.13 563.274 920.274 C +f +0.6 g +562.9 919.916 m +564.97 928.288 560.394 923.712 V +553.738 918.304 546.665 918.304 V +532.937 916.224 528.777 903.744 V +525.033 878.368 532.521 872.96 V +537.097 865.888 543.753 872.128 v +550.41 878.368 564.98 907.02 562.9 919.916 C +f +0.8 g +562.526 919.558 m +564.586 927.744 560.098 923.256 V +553.569 917.952 546.633 917.952 V +533.169 915.912 529.089 903.672 V +525.417 878.784 532.761 873.48 V +537.249 866.544 543.777 872.664 v +550.305 878.784 564.566 906.91 562.526 919.558 C +f +1 g +562.151 919.2 m +564.201 927.2 559.801 922.8 V +553.401 917.6 546.601 917.6 V +533.401 915.6 529.401 903.6 V +525.801 879.2 533.001 874 V +537.401 867.2 543.801 873.2 v +550.201 879.2 564.151 906.8 562.151 919.2 C +f +0.1 0.55 0.85 0.3 k +350.6 716 m +330.2 735.2 322.2 736 V +287.8 740 273 722 V +290.6 742.4 318.2 736.8 V +296.6 741.2 284.2 738 V +267.4 738 257.8 724 V +255 719.2 l +259 734 277.4 740 V +300.2 744.8 311 740 V +289.4 746.8 279.4 744.8 V +249 747.2 236.2 720.8 V +240.2 735.2 255 742.4 V +268.6 751.2 289 748.4 V +303.4 745.2 308.6 742.8 v +313.8 740.4 312.6 743.2 304.2 748 C +298.6 758 284.6 757.6 V +241.8 754 231.4 742 V +245 753.2 255.4 756 V +277.8 764 286.2 763.2 V +311 762.2 318.6 766.2 V +307.4 761.2 310.6 758 v +313.8 754.8 320.6 747.2 320.6 746 c +320.6 744.8 344.8 722.7 348.4 718.3 C +350.6 716 l +f +0.8 g +1 J 0.1 w +489 522 m +473.5 558.5 461 568 V +487 552 490.5 534 V +490.5 524 489 522 V +f +536 514.5 m +509.5 569.5 491 593.5 V +534.5 556 539.5 529.5 V +540 524 l +537 526.5 l +536.5 517.5 536 514.5 V +f +592.5 563 m +530 622.5 528.5 625 V +589 559 592 551.5 V +590 560.5 592.5 563 V +f +404 519.5 m +423.5 571.5 442.5 549 V +457.5 539 457 536 V +453 542.5 435 542 V +416 545 404 519.5 V +f +594.5 647 m +549.5 675.5 542 677 v +530.193 679.361 591.5 648 596.5 637.5 C +598.5 640 594.5 647 V +f +0 g +0 J 1 w +443.801 540.399 m +464.201 542.399 471.001 549.199 V +475.401 545.599 l +493.001 583.999 l +496.601 578.799 l +511.001 593.599 510.201 601.599 v +509.401 609.599 523.001 595.599 y +522.201 607.199 529.401 600.399 V +527.001 615.999 535.401 607.999 V +524.864 638.156 547.401 612.399 v +553.001 605.999 548.601 612.799 y +522.601 660.799 544.201 646.399 v +546.201 669.199 545.001 673.599 v +543.801 677.999 541.801 700.4 537.001 705.6 c +532.201 710.8 537.401 712.4 543.001 707.2 C +531.801 731.2 545.001 719.2 V +541.401 734.4 537.001 737.2 V +531.401 754.4 546.601 743.6 V +542.201 756 539.001 759.2 V +527.401 786.8 534.601 782 V +539.001 778.4 l +532.201 792.4 538.601 788 v +545.001 783.6 545.001 784 y +523.801 817.2 544.201 799.6 V +536.042 813.518 532.601 820.4 V +513.801 840.8 528.201 834.4 V +533.001 832.8 l +524.201 842.8 516.201 844.4 v +508.201 846 518.601 852.4 525.001 850.4 c +531.401 848.4 547.001 840.8 y +559.801 822 563.801 821.6 V +543.801 829.2 549.801 821.2 V +564.201 807.2 557.001 807.6 V +551.001 800.4 555.801 791.6 V +537.342 809.991 552.201 784.4 v +559.001 768 l +534.601 792.8 545.801 770.8 V +563.001 747.2 565.001 746.8 v +567.001 746.4 571.401 737.6 y +567.001 739.6 l +572.201 730.8 l +561.001 742.8 567.001 729.6 V +572.601 715.2 l +552.201 737.2 565.801 707.6 V +549.401 712.8 558.201 695.6 V +556.601 679.599 557.001 674.399 v +557.401 669.199 558.601 640.799 554.201 632.799 c +549.801 624.799 560.201 605.599 562.201 601.599 c +564.201 597.599 567.801 586.799 559.001 595.999 c +550.201 605.199 554.601 599.599 556.601 590.799 c +558.601 581.999 564.601 566.399 563.801 560.799 C +562.601 559.599 559.401 563.199 V +544.601 585.999 546.201 571.599 V +545.001 563.599 541.801 554.799 V +538.601 543.999 538.601 552.799 V +535.401 569.599 532.601 561.999 v +529.801 554.399 526.201 548.399 523.401 545.999 c +520.601 543.599 515.401 566.399 514.201 555.999 C +502.201 568.399 497.401 551.999 V +485.801 535.599 l +485.401 547.999 484.201 541.999 V +454.201 535.999 443.801 540.399 V +f +409.401 897.2 m +397.801 905.2 393.801 904.8 v +389.801 904.4 421.401 913.6 462.601 886 C +467.401 883.2 471.001 883.6 V +474.201 881.2 471.401 877.6 V +462.601 868 473.801 856.8 V +492.201 850 486.601 858.8 V +497.401 854.8 499.801 850.8 v +502.201 846.8 501.001 850.8 y +494.601 858 488.601 863.2 V +483.401 865.2 480.601 873.6 v +477.801 882 475.401 892 479.801 895.2 C +475.801 890.8 476.601 894.8 v +477.401 898.8 481.001 902.4 482.601 902.8 c +484.201 903.2 500.601 919 507.401 919.4 C +498.201 918 495.201 919 v +492.201 920 465.601 931.4 459.601 932.6 C +442.801 939.2 454.801 937.2 V +490.601 933.4 508.801 920.2 V +501.601 928.6 483.201 935.6 V +461.001 948.2 425.801 943.2 V +408.001 940 400.201 938.2 V +397.601 938.8 397.001 939.2 v +396.401 939.6 384.6 948.6 357 941.6 C +340 937 331.4 932.2 V +316.2 931 312.6 927.8 V +294 913.2 292 912.4 v +290 911.6 278.6 904 277.8 903.6 C +302.4 910.2 304.8 912.6 v +307.2 915 324.6 917.6 327 916.2 c +329.4 914.8 337.8 915.4 328.2 914.8 C +403.801 900 404.601 898 v +405.401 896 409.401 897.2 y +f +0.2 0.55 0.85 0 k +480.801 906.4 m +470.601 913.8 468.601 913.8 v +466.601 913.8 454.201 924 450.001 923.6 c +445.801 923.2 433.601 933.2 406.201 925 C +405.601 927 409.201 927.8 V +415.601 930 416.001 930.6 V +436.201 934.8 443.401 931.2 V +452.601 928.6 458.801 922.4 V +470.001 919.2 473.201 920.2 V +482.001 918 482.401 916.2 V +488.201 913.2 486.401 910.6 V +486.801 909 480.801 906.4 V +f +468.33 908.509 m +469.137 907.877 470.156 907.779 470.761 906.97 c +470.995 906.656 470.706 906.33 470.391 906.233 c +469.348 905.916 468.292 906.486 467.15 905.898 c +466.748 905.691 466.106 905.873 465.553 906.022 c +463.921 906.463 462.092 906.488 460.401 905.8 C +458.416 906.929 456.056 906.345 453.975 907.346 c +453.917 907.373 453.695 907.027 453.621 907.054 c +450.575 908.199 446.832 907.916 444.401 910.2 C +441.973 910.612 439.616 911.074 437.188 911.754 c +435.37 912.263 433.961 913.252 432.341 914.084 c +430.964 914.792 429.507 915.314 427.973 915.686 c +426.11 916.138 424.279 916.026 422.386 916.546 c +422.293 916.571 422.101 916.227 422.019 916.254 c +421.695 916.362 421.405 916.945 421.234 916.892 c +419.553 916.37 418.065 917.342 416.401 917 C +415.223 918.224 413.495 917.979 411.949 918.421 c +408.985 919.269 405.831 917.999 402.801 919 C +406.914 920.842 411.601 919.61 415.663 921.679 c +417.991 922.865 420.653 921.763 423.223 922.523 c +423.71 922.667 424.401 922.869 424.801 922.2 C +424.935 922.335 425.117 922.574 425.175 922.546 c +427.625 921.389 429.94 920.115 432.422 919.049 c +432.763 918.903 433.295 919.135 433.547 918.933 c +435.067 917.717 437.01 917.82 438.401 916.6 C +440.099 917.102 441.892 916.722 443.621 917.346 c +443.698 917.373 443.932 917.032 443.965 917.054 c +445.095 917.802 446.25 917.531 447.142 917.227 c +447.48 917.112 448.143 916.865 448.448 916.791 c +449.574 916.515 450.43 916.035 451.609 915.852 c +451.723 915.834 451.908 916.174 451.98 916.146 c +453.103 915.708 454.145 915.764 454.801 914.6 C +454.936 914.735 455.101 914.973 455.183 914.946 c +456.21 914.608 456.859 913.853 457.96 913.612 c +458.445 913.506 459.057 912.88 459.633 912.704 c +462.025 911.973 463.868 910.444 466.062 909.549 c +466.821 909.239 467.697 909.005 468.33 908.509 c +f +391.696 922.739 m +389.178 924.464 386.81 925.57 384.368 927.356 c +384.187 927.489 383.827 927.319 383.625 927.441 c +382.618 928.05 381.73 928.631 380.748 929.327 c +380.209 929.709 379.388 929.698 378.88 929.956 c +376.336 931.248 373.707 931.806 371.2 933 C +371.882 933.638 373.004 933.394 373.6 934.2 C +373.795 933.92 374.033 933.636 374.386 933.827 c +376.064 934.731 377.914 934.884 379.59 934.794 c +381.294 934.702 383.014 934.397 384.789 934.125 c +385.096 934.078 385.295 933.555 385.618 933.458 c +387.846 932.795 390.235 933.32 392.354 932.482 c +393.945 931.853 395.515 931.03 396.754 929.755 c +397.006 929.495 396.681 929.194 396.401 929 C +396.789 929.109 397.062 928.903 397.173 928.59 c +397.257 928.351 397.257 928.049 397.173 927.81 c +397.061 927.498 396.782 927.397 396.408 927.346 c +395.001 927.156 396.773 928.536 396.073 928.088 c +394.8 927.274 395.546 925.868 394.801 924.6 C +394.521 924.794 394.291 925.012 394.401 925.4 C +394.635 924.878 394.033 924.588 393.865 924.272 c +393.48 923.547 392.581 922.132 391.696 922.739 c +f +359.198 915.391 m +356.044 916.185 352.994 916.07 349.978 917.346 c +349.911 917.374 349.688 917.027 349.624 917.054 c +348.258 917.648 347.34 918.614 346.264 919.66 c +345.351 920.548 343.693 920.161 342.419 920.648 c +342.095 920.772 341.892 921.284 341.591 921.323 c +340.372 921.48 339.445 922.429 338.4 923 C +340.736 923.795 343.147 923.764 345.609 924.148 c +345.722 924.166 345.867 923.845 346 923.845 c +346.136 923.845 346.266 924.066 346.4 924.2 C +346.595 923.92 346.897 923.594 347.154 923.848 c +347.702 924.388 348.258 924.198 348.798 924.158 c +348.942 924.148 349.067 923.845 349.2 923.845 c +349.336 923.845 349.467 924.156 349.6 924.156 c +349.736 924.155 349.867 923.845 350 923.845 c +350.136 923.845 350.266 924.066 350.4 924.2 C +351.092 923.418 351.977 923.972 352.799 923.793 c +353.837 923.566 354.104 922.418 355.178 922.12 c +359.893 920.816 364.03 918.671 368.393 916.584 c +368.7 916.437 368.91 916.189 368.8 915.8 C +369.067 915.8 369.38 915.888 369.57 915.756 c +370.628 915.024 371.669 914.476 372.366 913.378 c +372.582 913.039 372.253 912.632 372.02 912.684 c +367.591 913.679 363.585 914.287 359.198 915.391 c +f +345.338 871.179 m +343.746 872.398 343.162 874.429 342.034 876.221 c +341.82 876.561 342.094 876.875 342.411 876.964 c +342.971 877.123 343.514 876.645 343.923 876.443 c +345.668 875.581 347.203 874.339 349.2 874.2 C +351.19 871.966 355.45 871.581 355.457 868.2 c +355.458 867.341 354.03 868.259 353.6 867.4 C +351.149 868.403 348.76 868.3 346.38 869.767 c +345.763 870.148 346.093 870.601 345.338 871.179 c +f +317.8 923.756 m +317.935 923.755 324.966 923.522 324.949 923.408 c +324.904 923.099 317.174 922.05 316.81 922.22 c +316.646 922.296 309.134 919.866 309 920 C +309.268 920.135 317.534 923.756 317.8 923.756 c +f +0 g +333.2 914 m +318.4 912.2 314 911 v +309.6 909.8 291 902.2 288 900.2 C +274.6 894.8 257.6 874.8 V +265.2 878.2 267.4 881 V +281 893.6 280.8 891 V +293 899.6 292.4 897.4 V +316.8 908.6 314.8 905.4 V +336.4 910 335.4 908 V +354.2 903.6 351.4 903.4 V +345.6 902.2 352 898.6 V +348.6 894.2 343.2 898.2 v +337.8 902.2 340.8 900 335.8 899 C +333.2 898.2 328.6 902.2 V +323 906.8 314.2 903.2 V +283.6 890.6 281.6 890 V +278 887.2 275.6 883.6 V +269.8 879.2 266.8 877.8 V +254 866.2 252.8 864.8 V +249.4 859.6 248.6 859.2 V +255 863 257 865 V +271 875 276.4 875.8 V +280.8 878.8 281.6 880.2 V +296 889.4 300.2 889.4 V +309.4 884.2 311.8 891.2 V +317.6 893 323.2 891.8 V +326.4 894.4 325.6 896.6 V +327.2 898.4 328.2 894.6 V +331.6 891 336.4 893 V +340.4 893.2 338.4 890.8 V +334 887 322.2 886.8 V +309.8 886.2 293.4 878.6 V +263.6 868.2 254.4 857.8 V +248 849 242.6 847.8 V +236.8 847 230.8 839.6 V +240.6 845.4 249.6 845.4 V +253.6 847.8 249.8 844.2 V +246.2 836.6 247.8 831.2 V +247.2 826 246.4 824.4 V +238.6 811.6 238.6 809.2 v +238.6 806.8 239.8 797 240.2 796.4 c +240.6 795.8 239.2 798 243 795.6 c +246.8 793.2 249.6 791.6 250.4 788.8 c +251.2 786 248.4 794.2 248.2 796 c +248 797.8 243.8 805 244.6 807.4 C +245.6 806.4 246.4 805 V +245.8 805.6 246.4 809.2 V +247.2 814.4 248.6 817.6 v +250 820.8 252 824.6 252.4 825.4 c +252.8 826.2 252.8 832 254.2 829.4 C +257.6 826.8 l +254.8 829.4 257 831.6 V +256 837.2 257.8 839.8 V +264.8 848.2 266.4 849.2 v +268 850.2 266.6 849.8 y +272.6 854 266.8 852.4 V +262.8 850.8 259.8 850.8 V +252.2 848.8 256.2 853 v +260.2 857.2 270.2 862.6 274 862.4 C +274.8 860.8 l +286 863.2 l +284.8 862.4 l +284.6 862.6 288.8 863 v +293 863.4 298.8 862 300.2 863.8 c +301.6 865.6 305 866.6 304.6 865.2 c +304.2 863.8 304 861.8 y +309 867.6 308.4 865.4 v +307.8 863.2 299.6 858 298.2 851.8 C +308.6 860 l +312.2 863 l +315.8 860.8 316 862.4 v +316.2 864 320.8 869.8 322 869.6 c +323.2 869.4 325.2 872.2 325 869.6 c +324.8 867 332.4 861.6 y +335.6 863.4 337 862 v +338.4 860.6 342.6 881.8 y +367.6 892.4 l +411.201 895.8 l +394.201 902.6 l +333.2 914 l +f +0.2 0.55 0.85 0.5 K +1 J 2 w +351.4 715 m +336.4 731.8 328 734.4 V +314.6 741.2 290 733.4 v +S +324.8 735.8 m +299.6 743.8 284.2 739.6 V +265.8 737.6 257.4 723.8 v +S +321.2 737 m +304.2 744.2 289.4 746.4 V +272.8 749 256.2 741.8 V +244 735.8 238.6 725.6 v +S +322.2 736.6 m +306.8 747.6 305.8 749 V +298.8 760 285.8 760.4 V +264.4 759.6 247.2 751.6 v +S +0 G +0 J 1 w +320.895 745.593 m +322.437 744.13 349.4 715.2 Y +384.6 678.599 356.6 712.8 Y +349 717.6 339.8 736.4 Y +338.6 739.2 353.8 729.2 Y +357.8 728.4 371.4 709.2 Y +364.6 711.6 369.4 704.4 Y +372.2 702.4 392.601 686.799 Y +396.201 682.799 400.201 681.199 Y +414.201 686.399 407.801 673.199 Y +410.201 666.399 415.801 677.999 Y +427.001 694.8 410.601 692.399 Y +380.6 689.599 373.8 705.6 Y +371.4 708 380.2 705.6 Y +388.601 703.6 373 718 Y +375.4 718 384.6 711.2 Y +395.001 702 397.001 704 Y +415.001 712.8 425.401 705.2 Y +427.401 703.6 421.801 696.8 423.401 691.599 c +425.001 686.399 429.801 673.999 Y +427.401 672.399 427.801 661.599 Y +444.601 638.399 435.001 640.399 Y +419.401 640.799 434.201 633.199 Y +437.401 631.199 446.201 623.999 Y +443.401 625.199 441.801 619.999 Y +446.601 615.999 443.801 611.199 Y +437.801 609.999 436.601 605.999 Y +443.401 597.999 433.401 597.599 Y +437.001 593.199 432.201 581.199 Y +427.401 581.199 421.001 575.599 Y +423.401 570.799 413.001 565.199 Y +404.601 563.599 407.401 556.799 Y +399.401 550.799 397.001 534.799 Y +396.201 524.399 393.801 521.199 399.001 523.199 c +404.201 525.199 403.401 537.599 Y +398.601 553.199 441.401 569.199 Y +445.401 570.799 446.201 575.999 Y +448.201 575.599 457.001 567.999 Y +464.601 556.799 465.001 565.999 Y +466.201 569.599 464.601 575.599 Y +470.601 597.199 456.601 603.599 Y +446.601 637.199 460.601 628.799 Y +463.401 623.199 474.201 617.999 y +477.801 620.399 L +476.201 625.199 484.601 631.199 Y +487.401 624.799 493.401 632.799 Y +497.001 657.199 509.401 642.799 Y +513.401 641.599 514.601 648.399 Y +518.201 658.799 514.601 672.399 Y +518.201 672.799 527.801 666.799 Y +530.601 670.399 521.401 687.199 525.401 684.799 c +529.401 682.399 533.801 680.799 Y +534.601 682.799 524.601 695.199 Y +520.201 698 515.001 718.4 Y +522.201 714.8 512.201 730 Y +512.201 733.2 518.201 744.4 Y +517.401 751.2 518.201 750.8 Y +521.001 749.6 529.001 748 522.201 754.4 c +515.401 760.8 523.001 765.6 Y +527.401 768.4 513.801 768 Y +508.601 772.4 509.001 776.4 Y +517.001 774.4 502.601 788.8 500.201 792.4 c +497.801 796 507.401 801.2 Y +520.601 804.8 509.001 808 Y +489.401 807.6 500.201 818.4 Y +506.201 818 504.601 820.4 Y +499.401 821.6 489.801 828 Y +485.801 831.6 489.401 830.8 Y +506.201 829.6 477.401 840.8 Y +485.401 840.8 467.401 851.2 Y +465.401 852.8 462.201 860.4 Y +456.201 865.6 451.401 872.4 Y +451.001 876.8 446.201 881.6 Y +434.601 895.2 429.001 894.8 Y +414.201 898.4 409.001 897.6 Y +356.2 893.2 l +329.8 880.4 337.6 859.4 Y +344 851 353.2 854.8 Y +357.8 861 369.4 858.8 Y +389.801 855.6 387.201 859.2 Y +384.801 863.8 368.6 870 368.4 870.6 c +368.2 871.2 359.4 874.6 Y +356.4 875.8 352 885 Y +348.8 888.4 364.6 882.6 Y +363.4 881.6 370.8 877.6 Y +388.201 878.6 398.801 867.8 Y +409.601 851.2 409.801 859.4 Y +412.601 868.8 400.801 890 Y +401.201 892 409.401 885.4 Y +410.801 887.4 411.601 881.6 Y +411.801 879.2 415.601 871.2 Y +418.401 858.2 422.001 865.6 Y +426.601 856.2 L +428.001 853.6 422.001 846 Y +421.801 843.2 422.601 843.4 417.001 835.8 c +411.401 828.2 414.801 823.8 Y +413.401 817.2 422.201 817.6 Y +424.801 815.4 428.201 815.4 Y +430.001 813.4 432.401 814 Y +434.001 817.8 440.201 815.8 Y +441.601 818.2 449.801 818.6 Y +450.801 821.2 451.201 822.8 454.601 823.4 c +458.001 824 433.401 867 Y +439.801 867.8 431.601 880.2 Y +429.401 886.8 440.801 872.2 443.001 870.8 c +445.201 869.4 446.201 867.2 444.601 867.4 c +443.001 867.6 441.201 865.4 442.601 865.2 c +444.001 865 457.001 850 460.401 839.8 c +463.801 829.6 469.801 825.6 476.001 819.6 c +482.201 813.6 481.401 789.4 Y +481.001 780.6 487.001 770 Y +489.001 766.2 484.801 748 Y +482.801 745.8 484.201 745 Y +485.201 743.8 492.001 730.6 Y +490.201 730.8 493.801 727.2 Y +499.001 721.2 492.601 724.2 Y +486.601 725.8 493.601 716 Y +494.801 714.2 485.801 718.8 Y +476.601 719.4 488.201 712.2 Y +496.801 705 485.401 709.4 Y +480.801 711.2 484.001 704.4 Y +487.201 702.8 504.401 695.8 Y +504.801 691.999 501.801 686.999 Y +502.201 682.999 500.001 679.599 Y +498.801 671.399 498.201 670.599 Y +494.001 670.399 486.601 656.599 Y +484.801 653.999 474.601 641.999 Y +472.601 634.999 454.601 642.199 Y +448.001 638.799 450.001 642.199 Y +449.601 644.399 454.401 650.399 Y +461.401 652.999 458.801 663.799 Y +462.801 665.199 451.601 667.999 451.801 669.199 c +452.001 670.399 457.801 671.799 Y +465.801 673.799 461.401 676.199 Y +460.801 680.199 463.801 685.799 Y +475.401 686.599 463.801 702.8 Y +453.001 710.4 452.001 716.2 Y +464.601 724.4 456.401 736.8 456.601 740.4 c +456.801 744 458.001 765.6 Y +456.001 771.8 453.001 785.4 Y +455.201 790.6 462.601 803.2 Y +465.401 807.4 474.201 812.2 472.001 815.2 c +469.801 818.2 462.001 816.4 Y +454.201 817.8 454.801 812.6 Y +453.201 811.6 452.401 806.6 Y +451.68 798.667 442.801 792.4 Y +431.601 786.2 440.801 782.2 Y +446.801 775.6 437.001 775.4 Y +426.001 777.2 434.201 767 Y +445.001 754.2 442.001 751.4 Y +431.801 750.4 444.401 741.2 y +443.601 743.2 443.801 741.4 v +444.001 739.6 447.001 735.4 447.801 733.4 c +448.601 731.4 444.601 731.2 Y +445.201 721.6 429.801 725.8 y +429.801 725.8 428.201 725.6 v +426.601 725.4 415.401 726.2 409.601 728.4 c +403.801 730.6 397.001 730.6 y +393.001 728.8 385.4 729 v +377.8 729.2 369.8 726.4 Y +365.4 726.8 374 731.2 374.2 731 c +374.4 730.8 380 736.4 372 735.8 c +350.203 734.165 339.4 744.4 Y +337.4 745.8 334.8 748.6 Y +324.8 750.6 336.2 736.2 Y +337.4 734.8 336 733.8 Y +335.2 735.4 327.4 740.8 Y +324.589 741.773 323.226 743.107 320.895 745.593 C +f +0.2 0.55 0.85 0.5 k +1 J 2 w +297 757.2 m +308.6 751.6 311.2 748.8 v +313.8 746 327.8 734.6 y +322.4 736.6 319.8 738.4 v +317.2 740.2 306.4 748.4 y +302.6 754.4 297 757.2 v +f +0.4 0.2 0.8 0 k +0 J 1 w +238.991 788.397 m +239.328 788.545 238.804 791.257 238.6 791.8 c +237.578 794.526 228.6 796 y +228.373 794.635 228.318 793.039 228.424 791.401 c +233.292 785.882 238.991 788.397 v +f +0.4 0.2 0.8 0.2 k +238.991 788.597 m +238.542 788.439 238.976 791.331 238.8 791.8 c +237.778 794.526 228.6 796.1 y +228.373 794.735 228.318 793.139 228.424 791.501 c +232.692 786.382 238.991 788.597 v +f +0 g +234.6 788.454 m +233.975 788.454 233.469 789.594 233.469 791 c +233.469 792.405 233.975 793.545 234.6 793.545 c +235.225 793.545 235.732 792.405 235.732 791 c +235.732 789.594 235.225 788.454 234.6 788.454 c +f +234.6 791 m +F +189 690.399 m +183.4 680.399 208.2 686.399 V +222.2 687.599 224.6 689.999 V +225.8 689.199 234.166 686.266 237 685.599 c +243.8 683.999 252.2 694 y +256.8 704.5 259.6 704.5 v +262.4 704.5 259.2 702.9 y +252.6 692.799 253 691.199 V +247.8 671.199 231.8 670.399 V +215.65 669.449 217 663.599 V +225.8 665.999 228.2 663.599 V +239 663.999 231 657.599 V +224.2 645.999 l +224.34 642.081 214.2 645.599 v +204.4 648.999 194.1 661.899 y +178.15 676.449 189 690.399 V +f +0.1 0.4 0.4 0 k +187.8 686.399 m +185.8 676.799 222.6 687.199 V +227 687.199 229.4 686.399 v +231.8 685.599 243.8 682.799 245.8 683.999 C +238.6 670.399 227 671.999 V +213.8 670.399 214.2 665.599 V +218.2 658.399 223 655.999 V +225.8 653.599 225.4 650.399 v +225 647.199 222.2 645.599 220.2 644.799 c +218.2 643.999 215 647.199 213.4 647.199 c +211.8 647.199 203.4 653.599 199 658.399 c +194.6 663.199 186.2 675.199 186.6 677.999 c +187 680.799 187.8 686.399 Y +f +0.1 0.4 0.4 0.2 k +191 668.949 m +193.6 664.999 196.8 660.799 199 658.399 c +203.4 653.599 211.8 647.199 213.4 647.199 c +215 647.199 218.2 643.999 220.2 644.799 c +222.2 645.599 225 647.199 225.4 650.399 c +225.8 653.599 223 655.999 Y +219.934 657.532 217.194 661.024 215.615 663.347 C +215.8 660.799 210.6 661.599 v +205.4 662.399 200.2 665.199 198.6 668.399 c +197 671.599 194.6 673.999 196.2 670.399 c +197.8 666.799 200.2 663.199 201.8 662.799 c +203.4 662.399 203 661.199 200.6 661.599 c +198.2 661.999 195.4 662.399 191 667.599 c +F +0.1 0.55 0.85 0.3 k +188.4 689.999 m +190.2 703.6 191.4 707.6 V +190.6 714.4 193 718.6 v +195.4 722.8 197.4 729 200.4 734.4 c +203.4 739.8 203.6 743.8 207.6 745.4 c +211.6 747 217.6 755.6 220.4 756.6 c +223.2 757.6 223 756.8 y +229.8 771.6 243.4 767.6 V +227.2 770.4 243 779.8 V +238.2 778.7 241.5 785.7 v +243.701 790.368 243.2 783.6 232.2 771.8 C +227.2 763.2 222 760.2 v +216.8 757.2 204.8 750.2 203.6 746.4 c +202.4 742.6 199.2 736.8 197.2 735.2 c +195.2 733.6 192.4 729.4 192 726 C +190.8 722 189.4 720.8 v +188 719.6 187.8 716.4 187.8 714.4 c +187.8 712.4 185.8 709.6 186 707.2 C +186.8 688.199 186.4 686.199 V +188.4 689.999 L +f +1 g +179.8 685.399 m +177.8 686.799 173.4 680.799 V +180.7 647.799 180.7 646.399 V +181.8 648.499 180.5 655.699 v +179.2 662.899 178.3 675.599 y +179.8 685.399 l +f +0.1 0.55 0.85 0.3 k +201.4 746 m +183.8 742.8 184.2 713.6 V +183.4 688.799 l +182.2 714.4 181 716 v +179.8 717.6 183.8 728.8 180.6 722.8 C +166.6 708.8 174.6 687.599 V +176.1 684.299 173.1 688.899 V +168.5 701.5 169.6 707.9 V +169.8 710.1 171.7 712.9 V +180.3 724.6 183 726.9 V +184.8 741.3 200.2 746.5 V +205.9 748.8 201.4 746 V +f +0 g +340.8 812.2 m +341.46 812.554 341.451 813.524 342.031 813.697 c +343.18 814.041 343.344 815.108 343.862 815.892 c +344.735 817.211 344.928 818.744 345.51 820.235 c +345.782 820.935 345.809 821.89 345.496 822.55 c +344.322 825.031 343.62 827.48 342.178 829.906 c +341.91 830.356 341.648 831.15 341.447 831.748 c +340.984 833.132 339.727 834.123 338.867 835.443 c +338.579 835.884 339.104 836.809 338.388 836.893 c +337.491 836.998 336.042 837.578 335.809 836.552 c +335.221 833.965 336.232 831.442 337.2 829 C +336.418 828.308 336.752 827.387 336.904 826.62 c +337.614 823.014 336.416 819.662 335.655 816.188 c +335.632 816.084 335.974 815.886 335.946 815.824 c +334.724 813.138 333.272 810.693 331.453 808.312 c +330.695 807.32 329.823 806.404 329.326 805.341 c +328.958 804.554 328.55 803.588 328.8 802.6 C +325.365 799.82 323.115 795.975 320.504 792.129 c +320.042 791.449 320.333 790.24 320.884 789.971 c +321.697 789.573 322.653 790.597 323.123 791.443 c +323.512 792.141 323.865 792.791 324.356 793.434 c +324.489 793.609 324.31 794.028 324.445 794.149 c +327.078 796.496 328.747 799.432 331.2 801.8 C +333.15 802.129 334.687 803.127 336.435 804.14 c +336.743 804.319 337.267 804.07 337.557 804.265 c +339.31 805.442 339.308 807.478 339.414 809.388 c +339.464 810.272 339.66 811.589 340.8 812.2 c +f +331.959 816.666 m +332.083 816.743 331.928 817.166 332.037 817.382 c +332.199 817.706 332.602 817.894 332.764 818.218 c +332.873 818.434 332.71 818.814 332.846 818.956 c +335.179 821.403 335.436 824.427 334.4 827.4 C +335.424 828.02 335.485 829.282 335.06 830.129 c +334.207 831.829 334.014 833.755 333.039 835.298 c +332.237 836.567 330.659 837.811 329.288 836.508 c +328.867 836.108 328.546 835.321 328.824 834.609 c +328.888 834.446 329.173 834.3 329.146 834.218 c +329.039 833.894 328.493 833.67 328.487 833.398 c +328.457 831.902 327.503 830.391 328.133 829.062 c +328.905 827.433 329.724 825.576 330.4 823.8 C +329.166 821.684 330.199 819.235 328.446 817.358 c +328.31 817.212 328.319 816.826 328.441 816.624 c +328.733 816.138 329.139 815.732 329.625 815.44 c +329.827 815.319 330.175 815.317 330.375 815.441 c +330.953 815.803 331.351 816.29 331.959 816.666 c +f +394.771 826.977 m +396.16 825.185 396.45 822.39 394.401 821 C +394.951 817.691 398.302 819.67 400.401 820.2 C +400.292 820.588 400.519 820.932 400.802 820.937 c +401.859 820.952 402.539 821.984 403.601 821.8 C +404.035 823.357 405.673 824.059 406.317 825.439 c +408.043 829.134 407.452 833.407 404.868 836.653 c +404.666 836.907 404.883 837.424 404.759 837.786 c +404.003 839.997 401.935 840.312 400.001 841 C +398.824 844.875 398.163 848.906 396.401 852.6 C +394.787 852.85 394.089 854.589 392.752 855.309 c +391.419 856.028 390.851 854.449 390.892 853.403 c +390.899 853.198 391.351 852.974 391.181 852.609 c +391.105 852.445 390.845 852.334 390.845 852.2 c +390.846 852.065 391.067 851.934 391.201 851.8 C +390.283 850.98 388.86 850.503 388.565 849.358 c +387.611 845.648 390.184 842.523 391.852 839.322 c +392.443 838.187 391.707 836.916 390.947 835.708 c +390.509 835.013 390.617 833.886 390.893 833.03 c +391.645 830.699 393.236 828.96 394.771 826.977 c +f +357.611 808.591 m +356.124 806.74 352.712 804.171 355.629 802.243 c +355.823 802.114 356.193 802.11 356.366 802.244 c +358.387 803.809 360.39 804.712 362.826 805.294 c +362.95 805.323 363.224 804.856 363.593 805.017 c +365.206 805.72 367.216 805.662 368.4 807 C +372.167 806.776 375.732 807.892 379.123 809.2 c +380.284 809.648 381.554 810.207 382.755 810.709 c +384.131 811.285 385.335 812.213 386.447 813.354 c +386.58 813.49 386.934 813.4 387.201 813.4 C +387.161 814.263 388.123 814.39 388.37 815.012 c +388.462 815.244 388.312 815.64 388.445 815.742 c +390.583 817.372 391.503 819.39 390.334 821.767 c +390.049 822.345 389.8 822.963 389.234 823.439 c +388.149 824.35 387.047 823.496 386 823.8 C +385.841 823.172 385.112 823.344 384.726 823.146 c +383.867 822.707 382.534 823.292 381.675 822.854 c +380.313 822.159 379.072 821.99 377.65 821.613 c +377.338 821.531 376.56 821.627 376.4 821 C +376.266 821.134 376.118 821.368 376.012 821.346 c +374.104 820.95 372.844 820.736 371.543 819.044 c +371.44 818.911 370.998 819.09 370.839 818.955 c +369.882 818.147 369.477 816.913 368.376 816.241 c +368.175 816.118 367.823 816.286 367.629 816.157 c +366.983 815.726 366.616 815.085 365.974 814.638 c +365.645 814.409 365.245 814.734 365.277 814.99 c +365.522 816.937 366.175 818.724 365.6 820.6 C +367.677 823.12 370.194 825.069 372 827.8 C +372.015 829.966 372.707 832.112 372.594 834.189 c +372.584 834.382 372.296 835.115 372.17 835.462 c +371.858 836.316 372.764 837.382 371.92 838.106 c +370.516 839.309 369.224 838.433 368.4 837 C +366.562 836.61 364.496 835.917 362.918 837.151 c +361.911 837.938 361.333 838.844 360.534 839.9 c +359.549 841.202 359.884 842.638 359.954 844.202 c +359.96 844.33 359.645 844.466 359.645 844.6 c +359.646 844.735 359.866 844.866 360 845 C +359.294 845.626 359.019 846.684 358 847 C +358.305 848.092 357.629 848.976 356.758 849.278 c +354.763 849.969 353.086 848.057 351.194 847.984 c +350.68 847.965 350.213 849.003 349.564 849.328 c +349.132 849.544 348.428 849.577 348.066 849.311 c +347.378 848.807 346.789 848.693 346.031 848.488 c +344.414 848.052 343.136 846.958 341.656 846.103 c +340.171 845.246 339.216 843.809 338.136 842.489 c +337.195 841.337 337.059 838.923 338.479 838.423 c +340.322 837.773 341.626 840.476 343.592 840.15 c +343.904 840.099 344.11 839.788 344 839.4 C +344.389 839.291 344.607 839.52 344.8 839.8 C +345.658 838.781 346.822 838.444 347.76 837.571 c +348.73 836.667 350.476 837.085 351.491 836.088 c +353.02 834.586 352.461 831.905 354.4 830.6 C +353.814 829.287 353.207 828.01 352.872 826.583 c +352.59 825.377 353.584 824.18 354.795 824.271 c +356.053 824.365 356.315 825.124 356.8 826.2 C +357.067 825.933 357.536 825.636 357.495 825.42 c +357.038 823.033 356.011 821.04 355.553 818.609 c +355.494 818.292 355.189 818.09 354.8 818.2 C +354.332 814.051 350.28 811.657 347.735 808.492 c +347.332 807.99 347.328 806.741 347.737 806.338 c +349.14 804.951 351.1 806.497 352.8 807 C +353.013 808.206 353.872 809.148 355.204 809.092 c +355.46 809.082 355.695 809.624 356.019 809.754 c +356.367 809.892 356.869 809.668 357.155 809.866 c +358.884 811.061 360.292 812.167 362.03 813.356 c +362.222 813.487 362.566 813.328 362.782 813.436 c +363.107 813.598 363.294 813.985 363.617 814.17 c +363.965 814.37 364.207 814.08 364.4 813.8 C +363.754 813.451 363.75 812.494 363.168 812.292 c +362.393 812.024 361.832 811.511 361.158 811.064 c +360.866 810.871 360.207 811.119 360.103 810.94 c +359.505 809.912 358.321 809.474 357.611 808.591 c +f +302.2 858 m +292.962 860.872 281.8 835.2 V +279.4 830 277 828 v +274.6 826 263.4 822.4 261.4 818.4 C +251 802.4 L +265.8 818.4 269 820.8 V +277 829.2 273.8 822.4 V +259.8 811.6 261 802.4 V +255.4 788 254.6 786 V +270.6 818 273 819.2 v +275.4 820.4 276.6 820.4 275.4 816.8 c +274.2 813.2 273.8 796.8 271 794.8 C +279 815.2 278.2 818.4 V +281.4 822 283.8 816.8 V +282.6 800.8 l +287 788.8 l +284.6 800 286.2 815.6 V +284.2 826 288.2 820.4 v +292.2 814.8 301.8 808.8 301.8 804 C +296.6 821.6 287.4 826.4 V +283.4 820.4 l +282.2 822.4 l +278.6 823.2 283 830 v +287.4 836.8 287 837.6 y +293.4 830.4 295 830.4 V +308.2 838 309.4 813.6 V +316.2 828 307 834.8 V +292.2 836.8 293.4 842 V +300.6 854.4 L +304.2 859.6 302.6 856.8 y +F +282.2 841.6 m +269.4 841.6 266.2 836.4 V +259 826.8 l +276.2 836.8 280.2 838 v +284.2 839.2 282.2 841.6 Y +f +242.2 835.2 m +240.2 834 239.8 831.2 v +239.4 828.4 237 828 237.8 825.2 c +238.6 822.4 240.6 820 240.6 824 c +240.6 828 242.2 830 243 831.2 c +243.8 832.4 245.4 836.8 242.2 835.2 c +f +233.4 774 m +225 778 221.8 781.6 v +218.6 785.2 219.052 780.034 214.2 780.4 c +208.353 780.841 209.4 796.8 y +205.4 789.2 l +204.2 774.8 212.2 777.2 v +216.107 778.372 217.4 776.8 215.8 776 c +214.2 775.2 221.4 774.8 218.6 773.2 c +215.8 771.6 230.2 776.8 227.8 766.4 C +233.4 774 L +f +220.8 759.6 m +205.4 755.2 201.8 764.8 V +197 762.4 199.2 759.4 v +201.4 756.4 202.6 756 y +208 754.8 207.4 754 v +206.8 753.2 204.4 749.8 y +214.6 755.8 220.8 759.6 v +f +1 g +449.201 681.399 m +448.774 679.265 447.103 678.464 445.201 677.799 C +443.284 678.757 440.686 681.863 438.801 679.799 C +438.327 680.279 437.548 680.339 437.204 681.001 c +436.739 681.899 437.011 682.945 436.669 683.743 c +436.124 685.015 435.415 686.381 435.601 687.799 C +437.407 688.511 438.002 690.417 437.528 692.18 c +437.459 692.437 437.03 692.634 437.23 692.983 c +437.416 693.306 437.734 693.533 438.001 693.8 C +437.866 693.665 437.721 693.432 437.61 693.452 c +437 693.558 437.124 694.195 437.254 694.582 c +437.839 696.328 439.853 696.592 441.201 695.4 C +441.457 695.965 441.966 695.771 442.401 695.8 C +442.351 696.379 442.759 696.906 442.957 697.326 c +443.475 698.424 445.104 697.318 445.901 697.93 c +446.977 698.755 448.04 699.454 449.118 698.851 c +450.927 697.838 452.636 696.626 453.835 694.885 c +454.41 694.051 454.65 692.77 454.592 691.812 c +454.554 691.165 453.173 691.517 452.83 690.588 c +452.185 688.84 454.016 688.321 454.772 686.983 c +454.97 686.634 454.706 686.33 454.391 686.232 c +453.98 686.104 453.196 686.293 453.334 685.84 c +454.306 682.647 451.55 681.969 449.201 681.399 C +f +439.6 661.799 m +439.593 663.537 437.992 665.293 439.201 666.999 C +439.336 666.865 439.467 666.644 439.601 666.644 c +439.736 666.644 439.867 666.865 440.001 666.999 C +441.496 664.783 445.148 663.855 445.006 661.009 c +444.984 660.562 443.897 659.644 444.801 658.999 C +442.988 657.651 442.933 655.281 442.001 653.399 C +440.763 653.685 439.551 654.048 438.401 654.599 C +438.753 656.085 438.636 657.769 439.456 659.089 c +439.89 659.787 439.603 660.866 439.6 661.799 c +f +0.8 g +273.4 670.799 m +256.542 660.663 270.6 675.999 v +279.4 685.599 289.4 691.199 y +299.8 695.6 303.4 696.8 v +307 698 322.2 703.2 325.4 703.6 c +328.6 704 338.2 708 345 704 c +351.8 700 359.8 695.6 y +343.4 704 339.8 701.6 v +336.2 699.2 329 699.6 323 696.4 C +308.2 691.999 305 689.999 v +301.8 687.999 291.4 676.399 289.8 677.199 c +288.2 677.999 290.2 678.399 291.4 681.199 c +292.6 683.999 290.6 685.599 282.6 679.199 c +274.6 672.799 273.4 670.799 Y +f +0 g +280.805 676.766 m +282.215 689.806 290.693 688.141 V +298.919 692.311 301.641 694.279 V +309.78 695.981 311.09 696.598 v +329.569 705.298 344.288 700.779 344.835 701.899 c +345.381 703.018 365.006 695.901 368.615 691.815 c +369.006 691.372 358.384 697.412 348.686 699.303 c +340.413 700.917 318.811 699.056 307.905 693.52 c +304.932 692.011 295.987 686.227 293.456 686.338 c +290.925 686.45 280.805 676.766 Y +f +0.8 g +277 651.199 m +261.8 653.599 278.6 655.199 V +296.6 657.199 300.6 662.399 V +314.2 671.599 317 671.999 v +319.8 672.399 349.8 679.599 350.2 681.999 c +350.6 684.399 356.2 684.399 357.8 683.599 c +359.4 682.799 358.6 681.599 355.8 680.799 c +353 679.999 321.8 663.599 315.4 662.399 c +309 661.199 297.4 653.599 292.6 652.399 c +287.8 651.199 277 651.199 Y +f +0 g +296.52 658.597 m +287.938 659.426 296.539 660.245 V +305.355 663.669 307.403 666.332 V +314.367 671.043 315.8 671.247 v +317.234 671.452 331.194 675.139 331.399 676.367 c +331.604 677.596 365.67 690.177 370.09 686.987 c +373.001 684.886 363.1 686.563 353.466 682.153 c +352.111 681.533 318.258 666.946 314.981 666.332 c +311.704 665.717 305.765 661.826 303.307 661.212 c +300.85 660.597 296.52 658.597 Y +f +288.6 656.399 m +293.8 656.799 292.6 655.199 v +291.4 653.599 289 654.399 y +288.6 656.399 l +f +281.4 654.799 m +286.6 655.199 285.4 653.599 v +284.2 651.999 281.8 652.799 y +281.4 654.799 l +f +271 653.199 m +276.2 653.599 275 651.999 v +273.8 650.399 271.4 651.199 y +271 653.199 l +f +263.4 652.399 m +268.6 652.799 267.4 651.199 v +266.2 649.599 263.8 650.399 y +263.4 652.399 l +f +301.8 691.999 m +306.2 691.999 305 690.399 v +303.8 688.799 300.6 689.199 y +301.8 691.999 l +f +291.8 686.399 m +298.306 688.54 295.8 685.199 v +294.6 683.599 292.2 684.399 y +291.8 686.399 l +f +280.6 681.599 m +285.8 681.999 284.6 680.399 v +283.4 678.799 281 679.599 y +280.6 681.599 l +f +273 675.599 m +278.2 675.999 277 674.399 v +275.8 672.799 273.4 673.599 y +273 675.599 l +f +266.2 670.799 m +271.4 671.199 270.2 669.599 v +269 667.999 266.6 668.799 y +266.2 670.799 l +f +305.282 664.402 m +312.203 664.934 310.606 662.805 v +309.009 660.675 305.814 661.74 y +305.282 664.402 l +f +315.682 669.202 m +322.603 669.734 321.006 667.605 v +319.409 665.475 316.214 666.54 y +315.682 669.202 l +f +326.482 673.602 m +333.403 674.134 331.806 672.005 v +330.209 669.875 327.014 670.94 y +326.482 673.602 l +f +336.882 678.402 m +343.803 678.934 342.206 676.805 v +340.609 674.675 337.414 675.74 y +336.882 678.402 l +f +309.282 696.402 m +316.203 696.934 314.606 694.805 v +313.009 692.675 309.014 692.94 y +309.282 696.402 l +f +319.282 699.602 m +326.203 700.134 324.606 698.005 v +323.009 695.875 318.614 696.14 y +319.282 699.602 l +f +296.6 659.599 m +301.8 659.999 300.6 658.399 v +299.4 656.799 297 657.599 y +296.6 659.599 l +f +0.1 0.55 0.85 0.3 k +223.4 758.8 m +219 750 218.6 746.8 V +219.4 755.6 220.6 757.6 v +221.8 759.6 223.4 758.8 y +f +205 744.8 m +201.8 730.4 202.2 727.6 V +201 739.2 201.4 740.4 v +201.8 741.6 205 744.8 y +f +0.8 g +225.8 819.4 m +225.6 816.2 l +223.4 816 l +237.6 803.4 238.2 795.8 V +239 804 225.8 819.4 V +f +0 g +229.784 818.135 m +229.353 818.551 229.572 819.296 229.164 819.556 c +228.355 820.072 230.462 820.129 230.234 820.845 c +229.851 822.051 230.038 822.072 229.916 823.348 c +229.859 823.946 230.447 825.486 230.832 825.926 c +232.278 827.578 230.954 830.51 232.594 832.061 c +232.898 832.35 233.274 832.902 233.559 833.32 c +234.218 834.283 235.402 834.771 236.352 835.599 c +236.67 835.875 236.469 836.702 237.038 836.61 c +237.752 836.495 238.993 836.625 238.948 835.784 c +238.835 833.664 237.506 831.944 236.226 830.276 C +236.677 829.572 236.219 828.937 235.935 828.38 c +234.6 825.76 234.789 822.919 234.615 820.079 c +234.61 819.994 234.303 819.916 234.311 819.863 c +234.664 817.528 235.248 815.329 236.127 813.1 c +236.493 812.17 236.964 811.275 237.114 810.348 c +237.225 809.662 237.328 808.829 236.92 808.124 C +238.955 805.234 237.646 802.583 238.815 799.052 c +239.022 798.427 240.714 796.513 240.251 796.674 c +237.738 797.545 237.626 797.943 237.449 798.696 c +237.303 799.319 236.973 800.696 236.736 801.298 c +236.672 801.462 236.501 803.346 236.423 803.468 c +234.91 805.85 236.268 805.674 234.898 808.032 C +233.47 808.712 232.504 809.816 231.381 810.978 c +231.183 811.182 232.326 811.906 232.145 812.119 c +231.053 813.408 229.9 814.175 230.236 815.668 c +230.391 816.358 230.528 817.415 229.784 818.135 c +f +226.2 816.4 m +226.6 809.6 229 808 v +231.4 806.4 230.2 807.2 227 808.4 c +223.8 809.6 225 810.4 y +222.2 810 224.6 808 v +227 806 230.6 803.6 229 803.6 c +227.4 803.6 219.8 807.6 219.8 810.4 c +219.8 813.2 218.8 817.3 y +219.9 818.1 224.7 818 V +226.1 817.3 226.2 816.4 V +f +1 g +1 J 0.1 w +225.4 797.8 m +216.88 800.591 198.4 797.2 V +207.431 799.278 226.2 797 v +236.5 795.75 225.4 797.8 Y +b +227.498 797.871 m +219.252 801.389 200.547 799.608 V +209.725 800.897 228.226 797.005 v +238.38 794.869 227.498 797.871 Y +b +229.286 797.778 m +221.324 801.899 202.539 801.514 V +211.787 802.118 229.948 796.86 v +239.914 793.975 229.286 797.778 Y +b +230.556 797.555 m +223.732 801.862 206.858 802.96 V +215.197 802.79 231.078 796.681 v +239.794 793.328 230.556 797.555 Y +b +345.84 787.039 m +344.91 786.395 345.124 787.576 v +345.339 788.757 373.547 801.927 377.161 801.677 C +346.913 788.471 345.84 787.039 V +b +342.446 786.4 m +341.57 785.685 341.691 786.879 v +341.812 788.073 368.899 803.418 372.521 803.452 C +343.404 787.911 342.446 786.4 V +b +339.16 785.025 m +338.332 784.253 338.374 785.453 v +338.416 786.652 358.233 802.149 368.045 804.023 C +350.015 795.896 339.16 785.025 V +b +336.284 783.162 m +335.539 782.468 335.577 783.547 v +335.615 784.627 353.449 798.574 362.28 800.26 C +346.054 792.946 336.284 783.162 V +b +0.8 g +0 J 1 w +304.6 635.199 m +289.4 637.599 306.2 639.199 V +324.2 641.199 328.2 646.399 V +341.8 655.599 344.6 655.999 v +347.4 656.399 363.8 659.999 364.2 662.399 c +364.6 664.799 370.6 667.199 372.2 666.399 c +373.8 665.599 373.8 656.399 371 655.599 c +368.2 654.799 349.4 647.599 343 646.399 c +336.6 645.199 325 637.599 320.2 636.399 c +315.4 635.199 304.6 635.199 Y +f +0 g +377.6 672.599 m +374.6 670.999 373.4 668.399 V +367 657.799 352.8 654.599 V +329.8 645.599 322 643.599 V +308.6 638.599 301.2 639.399 V +294.2 639.199 300.4 637.599 V +320.6 639.599 324 641.399 V +339.6 646.599 342.6 649.199 v +345.6 651.799 363.8 656.799 366 658.799 c +368.2 660.799 378 669.199 377.6 672.599 C +f +318.882 641.089 m +324.111 641.315 322.958 639.766 v +321.805 638.216 319.357 639.09 y +318.882 641.089 l +f +311.68 639.737 m +316.908 639.963 315.756 638.414 v +314.603 636.864 312.155 637.737 y +311.68 639.737 l +f +301.251 638.489 m +306.48 638.716 305.327 637.166 v +304.174 635.617 301.726 636.49 y +301.251 638.489 l +f +293.617 637.945 m +298.846 638.171 297.693 636.622 v +296.54 635.072 294.092 635.946 y +293.617 637.945 l +f +335.415 648.487 m +342.375 648.788 340.84 646.726 v +339.306 644.664 336.047 645.826 y +335.415 648.487 l +f +345.73 652.912 m +351.689 656.213 351.155 651.151 v +350.885 648.595 346.362 650.251 y +345.73 652.912 l +f +354.862 655.726 m +362.021 659.427 360.287 653.965 v +359.509 651.515 355.493 653.065 y +354.862 655.726 l +f +364.376 660.551 m +368.735 665.452 369.801 658.79 v +370.207 656.252 365.008 657.89 y +364.376 660.551 l +f +326.834 644.003 m +332.062 644.23 330.91 642.68 v +329.757 641.131 327.308 642.004 y +326.834 644.003 l +f +1 g +1 J 0.1 w +362.434 765.397 m +361.708 764.732 361.707 765.803 v +361.707 766.873 379.191 780.137 388.034 781.521 C +371.935 774.792 362.434 765.397 V +b +0 g +0 J 1 w +365.4 701.6 m +387.401 679.199 396.601 675.599 V +405.801 664.399 401.801 638.399 V +398.601 630.799 395.401 651.599 V +398.601 676.799 387.401 660.799 V +379 670.699 385.4 670.399 V +388.601 668.399 389.001 669.999 v +389.401 671.599 381.4 685.199 364.2 699.6 c +347 714 365.4 701.6 Y +f +1 g +1 J 0.1 w +307 662.799 m +306.8 664.599 308.6 663.799 v +310.4 662.999 404.601 656.799 436.201 632.799 C +391.001 655.999 307 662.799 V +b +317.4 667.199 m +317.2 668.999 319 668.199 v +320.8 667.399 457.401 668.399 481.001 635.999 C +459.001 661.199 317.4 667.199 V +b +329 671.199 m +328.8 672.999 330.6 672.199 v +332.4 671.399 505.801 684.399 529.401 651.999 C +519.801 677.599 329 671.199 V +b +339 675.999 m +338.8 677.799 340.6 676.999 v +342.4 676.199 464.601 714.8 488.201 682.399 C +474.801 707 339 675.999 V +b +281 653.199 m +280.8 654.999 282.6 654.199 v +284.4 653.399 302.2 651.199 304.2 612.399 C +297 654.399 281 653.199 V +b +272.2 651.599 m +272 653.399 273.8 652.599 v +275.6 651.799 289.8 656.399 287 617.599 C +288.2 652.799 272.2 651.599 V +b +264.2 651.199 m +264 652.999 265.8 652.199 v +267.6 651.399 283 650.799 270.6 628.399 C +280.2 652.399 264.2 651.199 V +b +311.526 695.535 m +311.082 693.536 312.631 694.753 v +328.699 707.378 361.141 766.28 416.826 771.914 C +378.518 784.024 311.526 695.535 V +b +322.726 697.335 m +321.363 698.528 323.231 699.153 v +325.099 699.778 437.541 772.28 476.826 764.314 C +449.719 771.824 322.726 697.335 V +b +301.885 691.233 m +301.376 689.634 303.087 690.61 v +312.062 695.73 315.677 752.941 359.254 754.196 C +326.843 768.91 301.885 691.233 V +b +281.962 680.207 m +280.885 678.921 282.838 679.175 v +293.084 680.507 314.489 721.778 358.928 716.699 C +326.962 731.045 281.962 680.207 V +b +293.2 686.333 m +292.389 684.864 294.258 685.489 v +304.057 688.763 317.141 733.375 361.729 736.922 C +327.603 744.865 293.2 686.333 V +b +274.922 675.088 m +274.049 674.046 275.631 674.252 v +283.93 675.331 301.268 708.76 337.264 704.646 C +311.371 716.266 274.922 675.088 V +b +267.323 669.179 m +266.318 668.134 267.909 668.252 v +272.077 668.561 302.715 701.64 321.183 686.138 C +309.168 704.861 267.323 669.179 V +b +336.855 701.102 m +335.654 702.457 337.586 702.842 v +339.518 703.226 460.221 760.939 498.184 748.073 C +472.243 758.947 336.855 701.102 V +b +303.4 636.799 m +303.2 638.599 305 637.799 v +306.8 636.999 322.2 636.399 309.8 613.999 C +319.4 637.999 303.4 636.799 V +b +313.8 638.399 m +313.6 640.199 315.4 639.399 v +317.2 638.599 335 636.399 337 597.599 C +329.8 639.599 313.8 638.399 V +b +320.6 639.999 m +320.4 641.799 322.2 640.999 v +324 640.199 348.6 636.799 372.2 604.399 C +336.6 641.199 320.6 639.999 V +b +328.225 642.028 m +327.788 643.786 329.678 643.232 v +331.568 642.678 352.002 644.577 390.099 610.401 C +343.924 645.344 328.225 642.028 V +b +338.625 646.428 m +338.188 648.186 340.078 647.632 v +341.968 647.078 376.802 642.577 428.499 607.601 C +354.324 649.744 338.625 646.428 V +b +298.2 657.999 m +298 659.799 299.8 658.999 v +301.6 658.199 355 655.599 385.4 628.799 C +350.499 653.574 298.2 657.999 V +b +288.2 653.999 m +288 655.799 289.8 654.999 v +291.6 654.199 316.2 650.799 339.8 618.399 C +304.2 655.199 288.2 653.999 V +b +349.503 651.038 m +348.938 652.759 350.864 652.345 v +352.79 651.932 387.86 649.996 441.981 618.902 C +364.317 653.296 349.503 651.038 V +b +357.903 653.438 m +357.338 655.159 359.264 654.745 v +361.19 654.332 396.26 652.396 450.381 621.302 C +373.317 656.096 357.903 653.438 V +b +367.503 658.438 m +366.938 660.159 368.864 659.745 v +370.79 659.332 413.86 654.996 503.582 620.702 C +382.917 661.096 367.503 658.438 V +b +0 g +0 J 1 w +256.2 651.599 m +261.4 651.999 260.2 650.399 v +259 648.799 256.6 649.599 y +256.2 651.599 l +f +287 637.599 m +292.2 637.999 291 636.399 v +289.8 634.799 287.4 635.599 y +287 637.599 l +f +278.2 637.999 m +283.4 638.399 282.2 636.799 v +281 635.199 278.6 635.999 y +278.2 637.999 l +f +182.831 649.818 m +187.876 648.495 186.218 647.376 v +184.561 646.256 182.554 647.798 y +182.831 649.818 l +f +184.831 659.418 m +189.876 658.095 188.218 656.976 v +186.561 655.856 184.554 657.398 y +184.831 659.418 l +f +177.631 663.818 m +182.676 662.495 181.018 661.376 v +179.361 660.256 177.354 661.798 y +177.631 663.818 l +f +0.8 g +1 J 0.1 w +257.4 588.799 m +255.8 588.799 251.8 586.799 V +249.8 586.799 238.6 583.199 233 573.199 C +245.4 582.799 257.4 588.799 V +f +345.116 496.153 m +345.257 495.895 345.312 495.475 345.604 495.458 c +346.262 495.418 347.495 495.117 347.37 495.753 c +346.522 500.059 345.648 504.996 341.515 506.803 c +340.876 507.082 339.434 506.669 339.36 505.785 c +339.233 504.261 339.116 502.912 339.425 501.446 c +339.725 500.025 341.883 500.015 342.8 501.399 C +343.736 499.727 344.168 497.884 345.116 496.153 c +f +334.038 491.419 m +334.786 490.006 334.659 488.147 336.074 487.584 c +336.814 487.29 338.664 488.265 338.246 489.339 c +337.444 491.4 337.056 493.639 335.667 495.45 c +335.467 495.712 335.707 496.245 335.547 496.573 c +334.953 497.793 333.808 498.528 332.4 498.199 C +331.285 495.996 332.433 493.867 333.955 492.158 c +334.091 492.006 333.925 491.63 334.038 491.419 c +f +294.436 496.609 m +294.328 496.986 294.29 497.449 294.455 497.77 c +294.986 498.803 295.779 499.925 295.442 500.947 c +295.094 502.003 293.978 501.821 293.328 501.252 c +292.193 500.258 292.144 498.432 291.453 497.073 c +291.257 496.687 291.308 496.114 290.867 495.723 c +290.393 495.302 289.953 493.778 290.049 493.207 c +290.102 492.894 289.919 482.986 290.141 483.249 c +290.76 483.982 293.81 493.716 293.879 494.608 c +293.936 495.339 294.668 495.804 294.436 496.609 c +f +268.798 503.401 m +271.432 505.9 274.222 508.861 273.78 512.573 c +273.664 513.549 271.889 513.022 271.702 512.176 c +270.9 508.551 268.861 505.89 266.293 503.498 c +264.097 501.451 262.235 495.107 262 494.599 C +265.697 499.855 267.954 502.601 268.798 503.401 c +f +255.224 509.365 m +255.747 509.735 255.445 510.226 255.662 510.558 c +256.615 512.016 257.916 513.262 257.934 515 c +257.937 515.277 257.559 515.586 257.224 515.362 c +256.947 515.178 256.605 515.048 256.497 514.918 c +254.467 512.469 253.067 509.798 251.624 506.986 c +251.441 506.629 250.297 502.138 250.61 502.027 c +250.849 501.942 252.569 506.123 252.779 506.237 c +254.042 506.923 254.054 508.538 255.224 509.365 c +f +271.957 489.821 m +272.401 490.69 273.977 491.892 273.864 492.781 c +273.746 493.709 274.214 495.152 273.302 494.464 c +272.045 493.516 268.596 492.167 268.326 486.359 c +268.3 485.788 271.274 488.481 271.957 489.821 c +f +286.4 506.999 m +286.8 507.667 287.508 507.194 287.967 507.457 c +288.615 507.829 289.226 508.387 289.518 509.036 c +290.488 511.185 292.257 513.005 292.4 515.399 C +290.909 516.804 290.23 514.764 289.6 513.799 C +288.277 515.446 287.278 513.572 285.978 513.053 c +285.908 513.025 285.695 513.372 285.62 513.345 c +284.443 512.905 283.763 511.824 282.765 511.043 c +282.594 510.909 282.189 511.089 282.042 510.953 c +281.39 510.35 280.417 510.025 280.137 509.343 c +279.027 506.636 275.887 504.541 274 496.999 C +274.381 496.09 278.512 503.641 278.999 504.339 c +279.835 505.535 279.953 502.678 281.229 503.344 c +281.28 503.371 281.466 503.133 281.6 502.999 C +281.794 503.279 282.012 503.508 282.4 503.399 C +282.4 503.799 282.266 504.355 282.467 504.514 c +283.704 505.491 283.62 506.559 284.4 507.799 C +284.858 507.01 285.919 507.729 286.4 506.999 C +f +346.2 452.599 m +353.6 472.999 349.2 484.199 V +360.6 462.599 356 451.399 V +355.6 461.799 351.6 466.799 V +347.6 453.999 346.2 452.599 V +f +331.4 455.199 m +336.8 463.999 328.8 482.399 V +328 461.999 321.2 450.999 V +335.4 471.199 331.4 455.199 V +f +321.4 457.199 m +321.2 477.199 321.6 480.199 V +317.8 463.599 307.6 453.999 V +322 465.999 321.4 457.199 V +f +311.8 489.199 m +317.8 475.599 307.8 457.199 V +314.2 469.399 309.4 476.399 V +312 479.799 311.8 489.199 V +f +292.6 457.599 m +291.6 473.199 293.4 475.399 V +293.6 481.799 293.2 482.799 V +297.2 488.999 297.4 481.599 V +298.8 473.799 301.6 469.199 V +305.2 463.799 305 457.399 V +295 487.599 292.6 457.599 V +f +289 485.199 m +282.4 474.399 280.6 455.399 V +279.2 461.599 283 475.999 V +287.2 491.399 289 485.199 V +f +267.2 465.399 m +272.2 470.799 273.6 475.799 V +277.2 491.599 270.8 482.999 V +271 474.999 262.8 467.599 V +267.6 469.999 267.2 465.399 V +f +261.4 470.399 m +264.8 487.799 265.6 488.599 V +267.4 491.999 264.6 488.799 V +255.8 469.599 251.8 462.999 V +259.8 472.199 261.4 470.399 V +f +255.6 486.999 m +267.2 509.399 245.4 483.599 V +256.4 493.399 255.6 486.999 V +f +240.2 501.599 m +245 520.399 247.6 520.199 V +255.8 529.199 249.2 518.599 V +243.2 508.999 243.8 499.199 V +243.2 508.799 240.2 501.599 V +f +570.5 513 m +558.5 523 556 526.5 V +569.5 508 569.5 501 V +572 508.5 570.5 513 V +f +576 535 m +555 550 551.5 557.5 V +578 528 578 523.5 V +578.5 532.5 576 535 V +f +593 689 m +581 697 579.5 695 V +590 688.5 592.5 680 V +591 689 593 689 V +f +601.5 608.5 m +584 620.5 l +603 603.5 603.5 599.5 V +601.5 608.5 L +f +0 g +1 w +210.75 631 m +232.75 626.25 l +S +261 469 m +260.5 472.5 251.5 462 v +S +266.5 464 m +268.5 470.5 262 466 v +S +320.5 455.5 m +322 466.5 310.5 453.5 v +S + +showpage + +%%Trailer +end +tigersave restore +%%EOF +</pre> + + + +</div> + +<div id="tiger1" style="display:none"> +(xtiger) .setGc +0 0 567 739 .gbox +1 0 0 -1 0 739 .transform +/time1 .date (getTime) 0 .call def +</div> + +<div id="tiger2" style="display:none"> +/time2 .date (getTime) 0 .call def +(msg) .getElementById (textContent) time2 time1 sub 1000 div put +</div> + +<script> +function tiger() {(new Wps).parse($$("wps"), $$("tiger1"), $$("tiger"), $$("tiger2"));} +</script> +<button onclick="javascript:tiger();">Draw</button> the tiger (be patient). + +<p> +Is this an interesting JavaScript and canvas benchmark? +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="right" /><col align="right" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">browser</th><th scope="col">WPS time [s]</th><th scope="col">WPS time (no bind) [s]</th><th scope="col">PostCanvas time [s]</th></tr> +</thead> +<tbody> +<tr><td>Chrome</td><td>2.7</td><td>4.1</td><td>1.6</td></tr> +<tr><td>Opera</td><td>17.9</td><td>12.3</td><td>0</td></tr> +<tr><td>Firefox 3.0</td><td>21.0</td><td>19.0</td><td>7.0</td></tr> +<tr><td>Firefox 3.5</td><td>13.0</td><td>9.5</td><td>3.3</td></tr> +<tr><td>Safari</td><td>2.9</td><td>0</td><td>0</td></tr> +</tbody> +</table> + + +<p> +The above times were on Vaio T7200 Core 2 2GHz 2GB running Ubuntu. +</p> +<p> +<a href="http://www.feiri.de/pcan/">PostCanvas</a> runs this <a href="http://www.feiri.de/pcan/example1.html">example</a> about 1.5 times (Chrome) to 3 times +(Firefox) faster. I am actually surprised that WPS runs only about +1.5 times slower in Chrome even though it interprets almost everything +with minimal number of operators coded directly in JavaScript +(compared to PostCanvas which implements all operators directly in +JavaScript). Time for Safari was reported by Will King and even +though it was not run on the same machine as the other tests, it shows +that the speed is comparable to Chrome. +</p> +<p> +Another surprise to me is that I expected more significant speed up +after implementing the <a href="http://www.capcode.de/help/bind">bind</a> operator. Why does Opera and +Firefox get slower in this case? +</p> +<p> +It should be fairly easy to speed WPS up by coding more operators +directly in JavaScript. The speed of PostCanvas could probably be +taken as the best case that could be achieved by optimizing WPS. +</p> + +<div class="figure"> +<p><img src="tiger.png" alt="tiger.png" /></p> +</div> + +<p> +Note by Dave Chapman: +</p> +<blockquote> + + +<p> +I've found that reducing the number of function calls in complex +scripts has by far the biggest gains in speed - but I guess you +already know this. For instance, when I run the Tiger demo it takes +about 19sec on my machine (FF3.0, dual core, 4gb ram) but according to +the firebug profiler it's making nearly 4 million function calls (as a +comparison PostCanvas is <b>only</b> making about 220,000 calls). +</p> + +</blockquote> + + +<p> +Note by Ray Johnson: +</p> +<blockquote> + + +<p> +Tested Safari 4.0.4 (Win) and Firefox 3.5.5 (Win): +</p> +<ul> +<li> +Safari 4.0.4 Tiger drawing time = 1.76 +</li> +<li> +Firefox 3.5.5 Tiger drawing time = 6.945 + +</li> +</ul> + +<p>I’m on a Dell T7400 Xeon Quad Core 3.0 GHz with 4GB Ram and Vista SP2 32 Bit-and +</p> + +</blockquote> + + +<p> +Firefox throws error about linecap and linejoin not being supported so +these were not used here. Opera throws an error when running the +PostCanvas example. The tiger does not look the same as rendered by +<a href="http://projects.gnome.org/evince/">Evince</a> (<a href="http://poppler.freedesktop.org/">poppler</a>/<a href="http://cairographics.org/">cairo</a>) so maybe the linecap and linejoin are +really needed to get proper image as intended. +</p> +<p> +It is also interesting to observe that PDF operators and their names +probably came up from shortening/compressing common "user-space" +PostScript operators in PostScript files. The tiger.eps file was +created in 1990 and contains some "shortcuts" that match PDF operators +standardised later. +</p> +</div> +</div> + +</div> + +<div id="outline-container-4" class="outline-1"> +<h1 id="sec-4">Drawing with PDF </h1> +<div class="outline-text-1" id="text-4"> + + +<p> +PDF is rather complex format. WPS aims to implement only drawing +operators that can be present in PDF content streams. The number of +these operators is fixed and limited. Even though the full PostScript +language is not required, it can be convenient to implement them in +PostScript. +</p> +<p> +However, some aspects (e.g. colors) are handled differently in PDF +compared to PostScript and these differences are not addressed by WPS. +I imagine that a supporting server-side solution like <a href="../ondoc/index.html">OnDoc</a> would +provide necessary data (e.g. decomposing PDF into pages and objects, +providing HTML 5 web fonts and font metrics) and WPS would only draw +preprocessed page content. +</p> +<p> +Quoting from <a href="http://www.adobe.com/print/features/psvspdf/index.html">Adobe</a>: +</p> +<blockquote> + +<p>A PDF file is actually a PostScript file which has already been +interpreted by a RIP and made into clearly defined objects. +</p> +</blockquote> + + + +</div> + +<div id="outline-container-4.1" class="outline-2"> +<h2 id="sec-4.1">Heart example </h2> +<div class="outline-text-2" id="text-4.1"> + + +<p> +See also the <a href="https://developer.mozilla.org/samples/canvas-tutorial/2_6_canvas_beziercurveto.html">original example</a> in JavaScript. +</p> + + +<canvas id="xheart"></canvas> +<div id="heart"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the JavaScript example from</span> +<span style="color: #cd0000;">% https://developer.mozilla.org/samples/canvas-tutorial/2_6_canvas_beziercurveto.html</span> + +0 0 150 150 .gbox + +q +75 40 m +75 37 70 25 50 25 c +20 25 20 62.5 20 62.5 c +20 80 40 102 75 120 c +110 102 130 80 130 62.5 c +130 62.5 130 25 100 25 c +85 25 75 37 75 40 c +f +Q +</pre> + + + +</div> +<script>wps.parse("save (xheart) .setGc", $$("heart"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-4.2" class="outline-2"> +<h2 id="sec-4.2">Rectangle example </h2> +<div class="outline-text-2" id="text-4.2"> + + +<p> +TODO find the original example +</p> + + +<canvas id="xrect"></canvas> +<div id="rect"> + +<pre class="src src-ps">0 0 170 170 .gbox + +1 0 0 1 80 80 cm +0 72 m +72 0 l +0 -72 l +-72 0 l +4 w +h S +</pre> + + + +</div> +<script>wps.parse("save (xrect) .setGc", $$("rect"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-4.3" class="outline-2"> +<h2 id="sec-4.3">Triangles example </h2> +<div class="outline-text-2" id="text-4.3"> + + +<p> +See also the <a href="https://developer.mozilla.org/samples/canvas-tutorial/2_3_canvas_lineto.html">original example</a> in JavaScript. +</p> + + +<canvas id="xtriangles"></canvas> +<div id="triangles"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the PDF example from</span> +<span style="color: #cd0000;">% https://developer.mozilla.org/samples/canvas-tutorial/2_3_canvas_lineto.html</span> + +0 0 150 150 .gbox + +25 25 m +105 25 l +25 105 l +f + +125 125 m +125 45 l +45 125 l +h +S +</pre> + + + +</div> +<script>wps.parse("save (xtriangles) .setGc", $$("triangles"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-4.4" class="outline-2"> +<h2 id="sec-4.4">Smile example </h2> +<div class="outline-text-2" id="text-4.4"> + + +<p> +See also the <a href="http://developer.mozilla.org/samples/canvas-tutorial/2_2_canvas_moveto.html">original example</a> in JavaScript. +</p> + + +<canvas id="xsmile"></canvas> +<div id="smile"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the JavaScript example from</span> +<span style="color: #cd0000;">% http://developer.mozilla.org/samples/canvas-tutorial/2_2_canvas_moveto.html</span> + +0 0 150 150 .gbox + +<span style="color: #cd0000;">%0 0 m % TODO m op meaning?</span> +newpath +75 75 50 0 360 arc <span style="color: #cd0000;">% TODO pdf way to draw arc?</span> +S +110 75 m +75 75 35 0 180 arcn +S +65 65 m +60 65 5 0 360 arc +S +95 65 m +90 65 5 0 360 arc +S +</pre> + + + +</div> +<script>wps.parse("save (xsmile) .setGc", $$("smile"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-4.5" class="outline-2"> +<h2 id="sec-4.5">Star example </h2> +<div class="outline-text-2" id="text-4.5"> + + +<p> +See also the <a href="http://www.adobe.com/technology/pdfs/presentations/KingPDFTutorial.pdf">original PDF document</a> where this example is presented. +</p> + + +<canvas id="xstar"></canvas> +<div id="star"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the PDF example from</span> +<span style="color: #cd0000;">% http://www.adobe.com/technology/pdfs/presentations/KingPDFTutorial.pdf</span> + +0 0 100 100 .gbox +1 0 0 -1 0 100 cm + +q +0 0 1 rg +4 0 0 4 50 50 cm + 0 5.5 m +-4 -5.5 l + 6 1 l +-6 1 l + 4 -5.5 l +f +Q +</pre> + + + +</div> +<script>wps.parse("save (xstar) .setGc", $$("star"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-4.6" class="outline-2"> +<h2 id="sec-4.6">Squares example </h2> +<div class="outline-text-2" id="text-4.6"> + + +<p> +See also the <a href="https://developer.mozilla.org/samples/canvas-tutorial/5_1_canvas_savestate.html">original example</a> in JavaScript. +</p> + + +<canvas id="xsquares"></canvas> +<div id="squares"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the JavaScript example from</span> +<span style="color: #cd0000;">% https://developer.mozilla.org/samples/canvas-tutorial/5_1_canvas_savestate.html</span> + +0 0 150 150 .gbox + +q +0 0 m 0 0 150 150 re f +q +0 0.4 1 rg +0 0 m 15 15 120 120 re f +q +1 1 1 rg +0.5 .setGlobalAlpha +0 0 m 30 30 90 90 re f +Q +0 0 m 45 45 60 60 re f +Q +0 0 m 60 60 30 30 re f +Q +</pre> + + + +</div> +<script>wps.parse("save (xsquares) .setGc", $$("squares"), "restore");</script> + +</div> + +</div> + +<div id="outline-container-4.7" class="outline-2"> +<h2 id="sec-4.7">Two squares example </h2> +<div class="outline-text-2" id="text-4.7"> + + +<p> +See also the <a href="https://developer.mozilla.org/en/drawing_graphics_with_canvas">original example</a> in JavaScript. +</p> + + +<canvas id="xsquares2"></canvas> +<div id="squares2"> + +<pre class="src src-ps"><span style="color: #cd0000;">% based on the JavaScript example from</span> +<span style="color: #cd0000;">% https://developer.mozilla.org/en/drawing_graphics_with_canvas</span> + +0 0 100 100 .gbox + +q +0.8 0 0 rg +0 0 m +10 10 55 50 re +f +0 0 0.8 rg +0.5 .setGlobalAlpha +0 0 m +30 30 55 50 re +f +Q +</pre> + + + +</div> +<script>wps.parse("save (xsquares2) .setGc", $$("squares2"), "restore");</script> + +</div> +</div> + +</div> + +<div id="outline-container-5" class="outline-1"> +<h1 id="sec-5">Operators and JavaScript bindings </h1> +<div class="outline-text-1" id="text-5"> + + +<p> +WPS implements a minimum core in JavaScript and the rest is +implemented in PostScript itself. +</p> +<p> +Many JavaScript data types map quite easily to PostScript data types +so native bindings can be implemented mostly in PostScript via +PostScript dictionaries (JavaScript objects). <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element">HTML 5 canvas API</a> +bindings are quite straightforward. +</p> + +</div> + +<div id="outline-container-5.1" class="outline-2"> +<h2 id="sec-5.1">Native operators </h2> +<div class="outline-text-2" id="text-5.1"> + + +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">category</th><th scope="col">in</th><th scope="col">operator</th><th scope="col">out</th></tr> +</thead> +<tbody> +<tr><td>Trivial</td><td></td><td><a href="http://www.capcode.de/help/true">true</a></td><td>true</td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/false">false</a></td><td>false</td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/null">null</a></td><td>null</td></tr> +<tr><td>Math</td><td>x y</td><td><a href="http://www.capcode.de/help/sub">sub</a></td><td>x-y</td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/mul">mul</a></td><td>x*y</td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/div">div</a></td><td>x/y</td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/mod">mod</a></td><td>x%y</td></tr> +<tr><td>Stack</td><td></td><td><a href="http://www.capcode.de/help/mark">mark</a></td><td>mark</td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/counttomark">counttomark</a></td><td>n</td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/exch">exch</a></td><td>y x</td></tr> +<tr><td></td><td>&hellip;</td><td><a href="http://www.capcode.de/help/clear">clear</a></td><td></td></tr> +<tr><td></td><td>x</td><td><a href="http://www.capcode.de/help/pop">pop</a></td><td></td></tr> +<tr><td></td><td>x<sub>n</sub> &hellip; x<sub>0</sub> n</td><td><a href="http://www.capcode.de/help/index">index</a></td><td>x<sub>n</sub> &hellip; x<sub>0</sub> x<sub>n</sub></td></tr> +<tr><td></td><td>x<sub>(n-1)</sub> &hellip; x<sub>0</sub> n j</td><td><a href="http://www.capcode.de/help/roll">roll</a></td><td>x<sub>((j-1) mod n)</sub> &hellip; x<sub>0</sub> &hellip; x<sub>(n-1)</sub> &hellip; x<sub>(j mod n)</sub></td></tr> +<tr><td></td><td>x<sub>1</sub> &hellip; x<sub>n</sub> n</td><td><a href="http://www.capcode.de/help/copy">copy</a></td><td>x<sub>1</sub> &hellip; x<sub>n</sub> x<sub>1</sub> &hellip; x<sub>n</sub></td></tr> +<tr><td>Array</td><td>array</td><td><a href="http://www.capcode.de/help/length">length</a></td><td>n</td></tr> +<tr><td></td><td>x<sub>n</sub> &hellip; x<sub>0</sub> array</td><td><a href="http://www.capcode.de/help/astore">astore</a></td><td>array</td></tr> +<tr><td></td><td>n</td><td><a href="http://www.capcode.de/help/array">array</a></td><td>array</td></tr> +<tr><td>Conditionals</td><td>x y</td><td><a href="http://www.capcode.de/help/eq">eq</a></td><td>bool</td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/lt">lt</a></td><td>bool</td></tr> +<tr><td>Control</td><td>bool then else</td><td><a href="http://www.capcode.de/help/ifelse">ifelse</a></td><td></td></tr> +<tr><td></td><td>n proc</td><td><a href="http://www.capcode.de/help/repeat">repeat</a></td><td></td></tr> +<tr><td></td><td>i j k proc</td><td><a href="http://www.capcode.de/help/for">for</a></td><td></td></tr> +<tr><td></td><td>array/dict/string proc</td><td><a href="http://www.capcode.de/help/forall">forall</a></td><td></td></tr> +<tr><td></td><td>any</td><td><a href="http://www.capcode.de/help/exec">exec</a></td><td></td></tr> +<tr><td></td><td>any</td><td><a href="http://www.capcode.de/help/cvx">cvx</a></td><td>any</td></tr> +<tr><td></td><td>any</td><td><a href="http://www.capcode.de/help/cvlit">cvlit</a></td><td>any</td></tr> +<tr><td>Dictionary</td><td>n</td><td><a href="http://www.capcode.de/help/dict">dict</a></td><td>dict</td></tr> +<tr><td></td><td>dict key</td><td><a href="http://www.capcode.de/help/get">get</a></td><td>any</td></tr> +<tr><td></td><td>dict key any</td><td><a href="http://www.capcode.de/help/put">put</a></td><td></td></tr> +<tr><td></td><td>dict</td><td><a href="http://www.capcode.de/help/begin">begin</a></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/end">end</a></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/currentdict">currentdict</a></td><td>dict</td></tr> +<tr><td></td><td>sym</td><td><a href="http://www.capcode.de/help/where">where</a></td><td>false / dict true</td></tr> +<tr><td>Miscellaneous</td><td></td><td><a href="http://www.capcode.de/help/save">save</a></td><td>dstack</td></tr> +<tr><td></td><td>dstack</td><td><a href="http://www.capcode.de/help/restore">restore</a></td><td></td></tr> +<tr><td></td><td>any</td><td><a href="http://www.capcode.de/help/type">type</a></td><td>name</td></tr> +<tr><td></td><td>bool</td><td>.strictBind</td><td></td></tr> +<tr><td></td><td>any</td><td><a href="http://www.capcode.de/help/bind">bind</a></td><td>any</td></tr> +<tr><td>Debugging</td><td>x</td><td><a href="http://www.capcode.de/help/=">=</a></td><td></td></tr> +<tr><td></td><td>x</td><td><a href="http://www.capcode.de/help/==">==</a></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/stack">stack</a></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/pstack">pstack</a></td><td></td></tr> +<tr><td>JavaScript FFI</td><td>x<sub>1</sub> &hellip; x<sub>n</sub> dict key n</td><td>.call</td><td>any</td></tr> +<tr><td></td><td></td><td>.math</td><td>Math</td></tr> +<tr><td></td><td></td><td>.date</td><td>(new Date)</td></tr> +<tr><td></td><td></td><td>.window</td><td>window</td></tr> +<tr><td></td><td>proc</td><td>.callback</td><td>callback</td></tr> +<tr><td>HTML</td><td>m</td><td>.minv</td><td>m<sup>-1</sup></td></tr> +<tr><td></td><td>m<sub>1</sub> m<sub>2</sub></td><td>.mmul</td><td>(m<sub>1</sub> x m<sub>2</sub>)</td></tr> +<tr><td></td><td>x y m</td><td>.xy</td><td>x' y'</td></tr> +<tr><td></td><td>r g b</td><td>.rgb</td><td>text</td></tr> +<tr><td></td><td>r g b a</td><td>.rgba</td><td>text</td></tr> +</tbody> +</table> + + +<p> +Some of the above operators could still be implemented in PostScript +instead of directly in JavaScript. +</p> +</div> + +</div> + +<div id="outline-container-5.2" class="outline-2"> +<h2 id="sec-5.2">Core operators </h2> +<div class="outline-text-2" id="text-5.2"> + + +<p> +TODO update +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">category</th><th scope="col">in</th><th scope="col">operator</th><th scope="col">out</th><th scope="col"></th></tr> +</thead> +<tbody> +<tr><td>Math</td><td></td><td><a href="http://www.capcode.de/help/abs">abs</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.acos</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.asin</td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/atan">atan</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.atan2</td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/ceiling">ceiling</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/cos">cos</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.exp</td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/floor">floor</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/log">log</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.max</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.min</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.pow</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.random</td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/rand">rand</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/round">round</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/sin">sin</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/sqrt">sqrt</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.tan</td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/truncate">truncate</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.e</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.ln2</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.ln10</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.log2e</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.log10e</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.pi</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.sqrt1<sub>2</sub></td><td></td><td></td></tr> +<tr><td></td><td></td><td>.sqrt2</td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/sub">sub</a></td><td></td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/idiv">idiv</a></td><td></td><td></td></tr> +<tr><td></td><td>num/string</td><td><a href="http://www.capcode.de/help/cvr">cvr</a></td><td>real</td><td></td></tr> +<tr><td></td><td>num/string</td><td><a href="http://www.capcode.de/help/cvi">cvi</a></td><td>int</td><td></td></tr> +<tr><td>Stack</td><td>x</td><td><a href="http://www.capcode.de/help/dup">dup</a></td><td>x x</td><td></td></tr> +<tr><td>Conditionals</td><td>x y</td><td><a href="http://www.capcode.de/help/ne">ne</a></td><td>bool</td><td></td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/ge">ge</a></td><td>bool</td><td></td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/le">le</a></td><td>bool</td><td></td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/gt">gt</a></td><td>bool</td><td></td></tr> +<tr><td></td><td>bool proc</td><td><a href="http://www.capcode.de/help/if">if</a></td><td></td><td></td></tr> +<tr><td>HTML 5</td><td>key</td><td>.gget</td><td></td><td></td></tr> +<tr><td></td><td>any key</td><td>.gput</td><td></td><td></td></tr> +<tr><td></td><td>key nargs</td><td>.gcall0</td><td></td><td></td></tr> +<tr><td></td><td>key nargs</td><td>.gcall1</td><td></td><td></td></tr> +<tr><td></td><td></td><td>.gcanvas</td><td>canvas</td><td></td></tr> +<tr><td></td><td>w h</td><td>.gdim</td><td></td><td></td></tr> +<tr><td></td><td>x0 y0 x1 y1</td><td>.gbox</td><td></td><td></td></tr> +</tbody> +</table> + + +</div> + +</div> + +<div id="outline-container-5.3" class="outline-2"> +<h2 id="sec-5.3">HTML 5 canvas methods and attributes </h2> +<div class="outline-text-2" id="text-5.3"> + + + +</div> + +<div id="outline-container-5.3.1" class="outline-3"> +<h3 id="sec-5.3.1">Canvas methods </h3> +<div class="outline-text-3" id="text-5.3.1"> + + +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /><col align="left" /></colgroup> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">in</th><th scope="col">canvas</th><th scope="col">out</th><th scope="col">ps</th><th scope="col">pdf</th></tr> +</thead> +<tbody> +<tr><td></td><td>.save</td><td></td><td><a href="http://www.capcode.de/help/gsave">gsave</a></td><td>q</td></tr> +<tr><td></td><td>.restore</td><td></td><td><a href="http://www.capcode.de/help/grestore">grestore</a></td><td>Q</td></tr> +<tr><td>x y</td><td>.scale</td><td></td><td><a href="http://www.capcode.de/help/scale">scale</a></td><td>-</td></tr> +<tr><td>angle</td><td>.rotate</td><td></td><td><a href="http://www.capcode.de/help/rotate">rotate</a></td><td>-</td></tr> +<tr><td>x y</td><td>.translate</td><td></td><td><a href="http://www.capcode.de/help/translate">translate</a></td><td>-</td></tr> +<tr><td>m11 m12 m21 m22 dx dy</td><td>.transform</td><td></td><td>-</td><td>cm</td></tr> +<tr><td>m11 m12 m21 m22 dx dy</td><td>.setTransform</td><td></td><td>-</td><td>-</td></tr> +<tr><td>x0 y0 x1 y1</td><td>.createLinearGradient</td><td>canvasGradient</td><td></td><td></td></tr> +<tr><td>x0 y0 r0 x1 y1 r1</td><td>.createRadialGradient</td><td>canvasGradient</td><td></td><td></td></tr> +<tr><td>image repetition</td><td>.createPattern</td><td>canvasPattern</td><td></td><td></td></tr> +<tr><td>x y w h</td><td>.clearRect</td><td></td><td><a href="http://www.capcode.de/help/rectclip">rectclip</a></td><td></td></tr> +<tr><td>x y w h</td><td>.fillRect</td><td></td><td><a href="http://www.capcode.de/help/rectfill">rectfill</a></td><td></td></tr> +<tr><td>x y w h</td><td>.strokeRect</td><td></td><td><a href="http://www.capcode.de/help/rectstroke">rectstroke</a></td><td></td></tr> +<tr><td></td><td>.beginPath</td><td></td><td><a href="http://www.capcode.de/help/newpath">newpath</a></td><td>m ?</td></tr> +<tr><td></td><td>.closePath</td><td></td><td><a href="http://www.capcode.de/help/closepath">closepath</a></td><td>~ h ? ~ n ?</td></tr> +<tr><td>x y</td><td>.moveTo</td><td></td><td><a href="http://www.capcode.de/help/moveto">moveto</a></td><td>m ?</td></tr> +<tr><td>x y</td><td>.lineTo</td><td></td><td><a href="http://www.capcode.de/help/lineto">lineto</a></td><td>l</td></tr> +<tr><td>cpx cpy x y</td><td>.quadraticCurveTo</td><td></td><td></td><td></td></tr> +<tr><td>cp1x cp1y cp2x cp2y x y</td><td>.bezierCurveTo</td><td></td><td></td><td>c</td></tr> +<tr><td>x1 y1 x2 y2 radius</td><td>.arcTo</td><td></td><td><a href="http://www.capcode.de/help/arcto">arcto</a></td><td></td></tr> +<tr><td>x y w h</td><td>.rect</td><td></td><td>-</td><td>~ re</td></tr> +<tr><td>x y radius startAngle endAngle anticlockwise</td><td>.arc</td><td></td><td>~ <a href="http://www.capcode.de/help/arc">arc</a> <a href="http://www.capcode.de/help/arcn">arcn</a></td><td></td></tr> +<tr><td></td><td>.fill</td><td></td><td><a href="http://www.capcode.de/help/fill">fill</a></td><td>~ f ?</td></tr> +<tr><td></td><td>.stroke</td><td></td><td><a href="http://www.capcode.de/help/stroke">stroke</a></td><td>S</td></tr> +<tr><td></td><td>.clip</td><td></td><td><a href="http://www.capcode.de/help/clip">clip</a></td><td>~ W ?</td></tr> +<tr><td>x y</td><td>.isPointInPath</td><td>boolean</td><td></td><td></td></tr> +<tr><td>text x y</td><td>.fillText1</td><td></td><td></td><td></td></tr> +<tr><td>text x y maxWidth</td><td>.fillText2</td><td></td><td></td><td></td></tr> +<tr><td>text x y</td><td>.strokeText1</td><td></td><td></td><td></td></tr> +<tr><td>text x y maxWidth</td><td>.strokeText2</td><td></td><td></td><td></td></tr> +<tr><td>text</td><td>.measureText</td><td>textMetrics</td><td></td><td></td></tr> +<tr><td>image dx dy</td><td>.drawImage1</td><td></td><td></td><td></td></tr> +<tr><td>image dx dy dw dh</td><td>.drawImage2</td><td></td><td></td><td></td></tr> +<tr><td>image sx sy sw sh dx dy dw dh</td><td>.drawImage3</td><td></td><td></td><td></td></tr> +<tr><td>imagedata</td><td>.createImageData1</td><td>imageData</td><td></td><td></td></tr> +<tr><td>sw sh</td><td>.createImageData1</td><td>imageData</td><td></td><td></td></tr> +<tr><td>sx sy sw sh</td><td>.getImageData</td><td>imageData</td><td></td><td></td></tr> +<tr><td>imagedata dx dy</td><td>.putImageData1</td><td></td><td></td><td></td></tr> +<tr><td>imagedata dx dy dirtyX dirtyY dirtyW dirtyH</td><td>.putImageData2</td><td></td><td></td><td></td></tr> +</tbody> +</table> + + +</div> + +</div> + +<div id="outline-container-5.3.2" class="outline-3"> +<h3 id="sec-5.3.2">Canvas attributes </h3> +<div class="outline-text-3" id="text-5.3.2"> + + +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /><col align="left" /></colgroup> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">type</th><th scope="col">attribute</th><th scope="col">values</th><th scope="col">ps</th><th scope="col">pdf</th></tr> +</thead> +<tbody> +<tr><td>num</td><td>.globalAlpha</td><td>(1.0)</td><td></td><td></td></tr> +<tr><td>str</td><td>.globalCompositeOperation</td><td>(source-over)</td><td></td><td></td></tr> +<tr><td>any</td><td>.strokeStyle</td><td>(black)</td><td>~ <a href="http://www.capcode.de/help/setdash">setdash</a> ?</td><td>~ d ?</td></tr> +<tr><td>any</td><td>.fillStyle</td><td>(black)</td><td></td><td></td></tr> +<tr><td>num</td><td>.lineWidth</td><td>(1)</td><td><a href="http://www.capcode.de/help/setlinewidth">setlinewidth</a></td><td>w</td></tr> +<tr><td>str</td><td>.lineCap</td><td>(butt) round square</td><td>~ <a href="http://www.capcode.de/help/setlinecap">setlinecap</a></td><td>J</td></tr> +<tr><td>str</td><td>.lineJoin</td><td>round bevel (miter)</td><td>~ <a href="http://www.capcode.de/help/setlinejoin">setlinejoin</a></td><td>j</td></tr> +<tr><td>num</td><td>.miterLimit</td><td>(10)</td><td><a href="http://www.capcode.de/help/setmiterlimit">setmiterlimit</a></td><td>M</td></tr> +<tr><td>num</td><td>.shadowOffsetX</td><td>(0)</td><td></td><td></td></tr> +<tr><td>num</td><td>.shadowOffsetY</td><td>(0)</td><td></td><td></td></tr> +<tr><td>num</td><td>.shadowBlur</td><td>(0)</td><td></td><td></td></tr> +<tr><td>str</td><td>.shadowColor</td><td>(transparent black)</td><td></td><td></td></tr> +<tr><td>str</td><td>.font</td><td>(10px sans-serif)</td><td></td><td></td></tr> +<tr><td>str</td><td>.textAlign</td><td>(start) end left right center</td><td></td><td></td></tr> +<tr><td>str</td><td>.textBaseline</td><td>top hanging middle (alphabetic) ideographic bottom</td><td></td><td></td></tr> +</tbody> +</table> + + +</div> + +</div> + +<div id="outline-container-5.3.3" class="outline-3"> +<h3 id="sec-5.3.3">Other operators </h3> +<div class="outline-text-3" id="text-5.3.3"> + + +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /><col align="left" /><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">in</th><th scope="col">canvas</th><th scope="col">out</th><th scope="col">ps</th><th scope="col">pdf</th></tr> +</thead> +<tbody> +<tr><td>canvasGradient offset color</td><td>.addColorStop</td><td></td><td></td><td></td></tr> +</tbody> +</table> + + +</div> + +</div> + +<div id="outline-container-5.3.4" class="outline-3"> +<h3 id="sec-5.3.4">Other attributes </h3> +<div class="outline-text-3" id="text-5.3.4"> + + +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /><col align="left" /></colgroup> +<colgroup><col align="left" /><col align="left" /></colgroup> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">dict</th><th scope="col">type</th><th scope="col">attribute</th><th scope="col">values</th><th scope="col">ps</th><th scope="col">pdf</th></tr> +</thead> +<tbody> +<tr><td>textMetrics</td><td>num</td><td>width</td><td></td><td></td><td></td></tr> +<tr><td>imageData</td><td>cnt</td><td>width</td><td></td><td></td><td></td></tr> +<tr><td>imageData</td><td>cnt</td><td>heigth</td><td></td><td></td><td></td></tr> +<tr><td>imageData</td><td>canvasPixelArray</td><td>data</td><td></td><td></td><td></td></tr> +<tr><td>canvasPixelArray</td><td>cnt</td><td>length</td><td></td><td></td><td></td></tr> +</tbody> +</table> + + +<p> +TODO [IndexGetter, IndexSetter] CanvasPixelArray +</p> +</div> +</div> + +</div> + +<div id="outline-container-5.4" class="outline-2"> +<h2 id="sec-5.4">PostScript operators </h2> +<div class="outline-text-2" id="text-5.4"> + + +<p> +TODO update +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">category</th><th scope="col">in</th><th scope="col">operator</th><th scope="col">out</th></tr> +</thead> +<tbody> +<tr><td></td><td>x y [m]</td><td><a href="http://www.capcode.de/help/transform">transform</a></td><td>x y</td></tr> +<tr><td></td><td>x y [m]</td><td><a href="http://www.capcode.de/help/itransform">itransform</a></td><td>x y</td></tr> +<tr><td></td><td>gray</td><td><a href="http://www.capcode.de/help/setgray">setgray</a></td><td></td></tr> +<tr><td></td><td>r g b</td><td><a href="http://www.capcode.de/help/setrgbcolor">setrgbcolor</a></td><td></td></tr> +<tr><td></td><td>???</td><td><a href="http://www.capcode.de/help/setfont">setfont</a> ?</td><td></td></tr> +<tr><td></td><td></td><td><a href="http://www.capcode.de/help/clippath">clippath</a> ?</td><td></td></tr> +<tr><td></td><td>text</td><td><a href="http://www.capcode.de/help/show">show</a> ?</td><td></td></tr> +<tr><td></td><td>x y</td><td><a href="http://www.capcode.de/help/rlineto">rlineto</a></td><td></td></tr> +</tbody> +</table> + + +</div> + +</div> + +<div id="outline-container-5.5" class="outline-2"> +<h2 id="sec-5.5">PDF operators </h2> +<div class="outline-text-2" id="text-5.5"> + + +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">category</th><th scope="col">operator</th><th scope="col">meaning</th></tr> +</thead> +<tbody> +<tr><td>General graphics state</td><td>w</td><td>setlinewidth</td></tr> +<tr><td></td><td>J</td><td>~ setlinecap</td></tr> +<tr><td></td><td>j</td><td>~ setlinejoin</td></tr> +<tr><td></td><td>M</td><td>setmiterlimit</td></tr> +<tr><td></td><td>d</td><td>~ setdash ?</td></tr> +<tr><td></td><td>ri</td><td></td></tr> +<tr><td></td><td>i</td><td>1 .min setflat</td></tr> +<tr><td></td><td>gs</td><td></td></tr> +<tr><td>Special graphics state</td><td>q</td><td>gsave</td></tr> +<tr><td></td><td>Q</td><td>grestore</td></tr> +<tr><td></td><td>cm</td><td>.transform</td></tr> +<tr><td>Path construction</td><td>m</td><td>moveto</td></tr> +<tr><td></td><td>l</td><td>lineto</td></tr> +<tr><td></td><td>c</td><td>.bezierCurveTo (~ curveto)</td></tr> +<tr><td></td><td>v</td><td>currentpoint 6 2 roll c</td></tr> +<tr><td></td><td>y</td><td>2 copy c</td></tr> +<tr><td></td><td>h</td><td>closepath</td></tr> +<tr><td></td><td>re</td><td>! x y m , x+w y l , x+w y+h l , x y+h l , h</td></tr> +<tr><td>Path painting</td><td>S</td><td>stroke</td></tr> +<tr><td></td><td>s</td><td>h S</td></tr> +<tr><td></td><td>f</td><td>~ fill</td></tr> +<tr><td></td><td>F</td><td>f</td></tr> +<tr><td></td><td>f*</td><td>~ eofill</td></tr> +<tr><td></td><td>B</td><td>f S ! q f Q S</td></tr> +<tr><td></td><td>B*</td><td>f* S ! q f* Q S</td></tr> +<tr><td></td><td>b</td><td>h B</td></tr> +<tr><td></td><td>b*</td><td>h B*</td></tr> +<tr><td></td><td>n</td><td>~ newpath</td></tr> +<tr><td>Clipping paths</td><td>W</td><td>clip</td></tr> +<tr><td></td><td>W*</td><td>eoclip</td></tr> +<tr><td>Text objects</td><td>BT</td><td>~ q</td></tr> +<tr><td></td><td>ET</td><td>~ Q</td></tr> +<tr><td>Text state</td><td>Tc</td><td></td></tr> +<tr><td></td><td>Tw</td><td></td></tr> +<tr><td></td><td>Tz</td><td></td></tr> +<tr><td></td><td>TL</td><td></td></tr> +<tr><td></td><td>Tf</td><td></td></tr> +<tr><td></td><td>Tr</td><td></td></tr> +<tr><td></td><td>Ts</td><td></td></tr> +<tr><td>Text positioning</td><td>Td</td><td></td></tr> +<tr><td></td><td>TD</td><td></td></tr> +<tr><td></td><td>Tm</td><td></td></tr> +<tr><td></td><td>T*</td><td></td></tr> +<tr><td>Text showing</td><td>Tj</td><td>~ show</td></tr> +<tr><td></td><td>TJ</td><td></td></tr> +<tr><td></td><td>'</td><td></td></tr> +<tr><td></td><td>"</td><td></td></tr> +<tr><td>Type 3 fonts</td><td>d0</td><td>setcharwidth</td></tr> +<tr><td></td><td>d1</td><td>setcachedevice</td></tr> +<tr><td>Color</td><td>CS</td><td></td></tr> +<tr><td></td><td>cs</td><td></td></tr> +<tr><td></td><td>SC</td><td></td></tr> +<tr><td></td><td>SCN</td><td></td></tr> +<tr><td></td><td>sc</td><td></td></tr> +<tr><td></td><td>scn</td><td></td></tr> +<tr><td></td><td>G</td><td>g</td></tr> +<tr><td></td><td>g</td><td>setgray</td></tr> +<tr><td></td><td>RG</td><td>rg</td></tr> +<tr><td></td><td>rg</td><td>setrgbcolor</td></tr> +<tr><td></td><td>K</td><td>k</td></tr> +<tr><td></td><td>k</td><td>setcmykcolor</td></tr> +<tr><td>Shading patterns</td><td>sh</td><td></td></tr> +<tr><td>Inline images</td><td>BI</td><td></td></tr> +<tr><td></td><td>ID</td><td></td></tr> +<tr><td></td><td>EI</td><td></td></tr> +<tr><td>XObjects</td><td>Do</td><td></td></tr> +<tr><td>Marked content</td><td>MP</td><td></td></tr> +<tr><td></td><td>DP</td><td></td></tr> +<tr><td></td><td>BMC</td><td></td></tr> +<tr><td></td><td>BDC</td><td></td></tr> +<tr><td></td><td>EMC</td><td></td></tr> +<tr><td>Compatibility</td><td>BX</td><td></td></tr> +<tr><td></td><td>EX</td><td></td></tr> +</tbody> +</table> + + +</div> +</div> + +</div> + +<div id="outline-container-6" class="outline-1"> +<h1 id="sec-6">Supported Browsers </h1> +<div class="outline-text-1" id="text-6"> + + +<p> +I have tried the following browsers so far: +</p> +<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<caption></caption> +<colgroup><col align="left" /></colgroup> +<colgroup><col align="left" /><col align="left" /> +</colgroup> +<thead> +<tr><th scope="col">Browser</th><th scope="col">Version</th><th scope="col">Note</th></tr> +</thead> +<tbody> +<tr><td>Firefox</td><td>3.0.11</td><td>no text drawing, linecap, linejoin</td></tr> +<tr><td></td><td>3.5b4pre</td><td>~ same as Firefox 3.0.11?</td></tr> +<tr><td></td><td>3.5.5 Win</td><td>reported by Ray Johnson</td></tr> +<tr><td>Opera</td><td>10.00 Beta</td><td>no text drawing, ugly aliasing</td></tr> +<tr><td>Chrome</td><td>3.0.189.0</td><td>lines not joined properly</td></tr> +<tr><td>Safari</td><td>for Mac Version 4.0.2 (5530.19)</td><td>reported by Will King</td></tr> +<tr><td></td><td>4.0.4 Win</td><td>reported by Ray Johnson</td></tr> +</tbody> +</table> + + +<p> +If you are using a different browser, please <a href="http://logand.com/contact.html">let me know</a> if it works +for you. +</p> +</div> + +</div> + +<div id="outline-container-7" class="outline-1"> +<h1 id="sec-7">Limitations and Known Issues </h1> +<div class="outline-text-1" id="text-7"> + + +<ul> +<li> +many PostScript operators are still to be implemented +</li> +<li> +only small fraction of PDF operators has been implemented +</li> +<li> +text drawing and font related functionality has not been implemented + +</li> +</ul> +</div> + +</div> + +<div id="outline-container-8" class="outline-1"> +<h1 id="sec-8">Changes </h1> +<div class="outline-text-1" id="text-8"> + + +<p> +2009-07-15 v0.2 +</p> +<ul> +<li> +Capable of drawing tiger.eps +</li> +<li> +JavaScript callbacks and timer added +</li> +<li> +bind operator implemented +</li> +<li> +Refactored JavaScript code: parser, evaluator and PostScript +interpreter separated +</li> +<li> +Improved documentation + +</li> +</ul> + +<p>2009-06-30 v0.1 +</p> +<ul> +<li> +Initial version + +</li> +</ul> +</div> + +</div> + +<div id="outline-container-9" class="outline-1"> +<h1 id="sec-9">Links </h1> +<div class="outline-text-1" id="text-9"> + + +<p> +Discussions about WPS on <a href="http://www.reddit.com/r/programming/comments/95xll/wps_postscript_and_pdf_interpreter_for_html_5/">reddit</a> and <a href="http://ajaxian.com/archives/wps-postscript-and-pdf-interpreter-for-html-5-canvas">ajaxian</a>. +</p> +<p> +<a href="http://www.feiri.de/pcan/">PostCanvas</a> is a RPN interpreter with many PostScript operators +implemented directly in JavaScript. It is faster than WPS but not a +"real" PostScript. +</p> +<p> +<a href="http://svgkit.sourceforge.net/">SVGKit</a> has a PostScript interpreter on the wish list. +</p> +<p> +PostScript is a registered trademark of <a href="http://www.adobe.com">Adobe Systems Incorporated</a>. +</p></div> +</div> +<div id="postamble"> +<p class="author"> Author: Tomas Hlavaty +<a href="mailto:tom@logand.com">&lt;tom@logand.com&gt;</a> +</p> +<p class="date"> Date: 2010-01-24 21:15:49 CET</p> +<p class="creator">HTML generated by org-mode 6.30trans in emacs 23</p> +</div> +</div> +</body> +</html>