wps

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

commit b0b0c6847b33930845323e84a805a7269ab611c9
parent 66a6ea71ddfcfab379efeec941d89957e7242379
Author: tomas <tomas@logand.com>
Date:   Sat, 23 Jan 2010 14:29:31 +0100

Changes from 2009-06-30

Diffstat:
Mwps.wps | 14++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/wps.wps b/wps.wps @@ -161,7 +161,9 @@ systemdict/def{currentdict 2 index 2 index put pop pop}put /.clip{(clip)0 .gcall0}def /.isPointInPath{(isPointInPath)2 .gcall1}def /.fillText{(fillText)4 .gcall0}def +/.fillText{}def % TODO not working in Firefox /.strokeText{(strokeText)4 .gcall0}def +/.strokeText{}def % TODO not working in Firefox /.measureText{(measureText)1 .gcall1}def /.drawImage1{(drawImage1)5 .gcall0}def /.drawImage2{(drawImage2)9 .gcall0}def @@ -227,8 +229,8 @@ systemdict/def{currentdict 2 index 2 index put pop pop}put .tm exch .mmul setmatrix % = .tm x m } def -/transform{dup type(arraytype)ne{.tm}if .xy}def -/itransform{dup type(arraytype)ne{.tm}if .minv .xy}def +/transform{dup type(arraytype)ne{.tmd}if .xy}def % TODO why .tmd not .tm? +/itransform{dup type(arraytype)ne{.tmd}if .minv .xy}def % TODO why .tmd not .tm? /.scaleM{0 0 3 2 roll 0 0 6 array astore}def % x y -- [x 0 0 y 0 0] /.scale3{pop .scaleM}def @@ -289,7 +291,7 @@ systemdict/def{currentdict 2 index 2 index put pop pop}put /setrgbcolor{3{255 mul round 3 1 roll}repeat .rgb dup .setStrokeStyle .setFillStyle}def /setfont{} def % TODO C.font = N + "pt " + F.V; /clippath{0 0 .gcanvas(width)get .gcanvas(height)get .rect}def % TODO -/show{currentpoint 3 2 roll .fillText .strokeText}def % TODO +/show{currentpoint 3 2 roll 3 copy .fillText .strokeText}def % TODO /rlineto{.tmd .xy .py add exch .px add exch .tmd .minv .xy lineto}def @@ -298,8 +300,6 @@ systemdict/def{currentdict 2 index 2 index put pop pop}put /showpage{}def % TODO -%/arc{.deg2rad exch .deg2rad exch true (arc)6 .gcall0}def % TODO currentpoint -%/arcn{.deg2rad exch .deg2rad exch false(arc)6 .gcall0}def % TODO currentpoint /arc{.deg2rad exch .deg2rad exch true .arc}def % TODO currentpoint /arcn{.deg2rad exch .deg2rad exch false .arc}def % TODO currentpoint @@ -309,7 +309,7 @@ systemdict/def{currentdict 2 index 2 index put pop pop}put /stroke{.stroke newpath currentpoint .moveTo}def -/curveto{2 copy .setPoint .bezierCurveTo}def +/curveto{2 copy .setPoint 2 copy .setPath/.tmd matrix def .bezierCurveTo}def /grestoreall{}def % TODO @@ -389,8 +389,6 @@ systemdict/def{currentdict 2 index 2 index put pop pop}put /BX{}def % TODO /EX{}def % TODO -/PS{cvx exec}def - % /Operators 50 dict begin % /cs { //ResolveColorSpace exec //SetColorSpaceSafe exec % } bind def