chiark / gitweb /
pumpkin-books.ps: wip before change coords
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Dec 2020 23:19:16 +0000 (23:19 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 2 Dec 2020 23:38:24 +0000 (23:38 +0000)
pumpkin-books.ps

index a0bb4032c32e2240421a091f2db97e8a1c8cee3d..c8102a761e41785a6496c47c47d613003d7ba590 100644 (file)
@@ -9,7 +9,16 @@
 /th 73 def
 /bdiag 5 def
 
-/prop 
+/diagconv {                    % xprop(-1..+1) yprop(0..1)
+    dup th mul                 % xprop yprop y
+    3 1 roll                   % y xprop yprop
+    bdiag mul neg              % y xprop x-margin-at-this-height
+    tw add             % y xprop x-width-at-this-height
+    exch                       % y x-width-at-this-height xprop
+    1 add 0.5 mul             % y x-width-at-this-height xprop-adj(0..1)
+    mul                        % y x
+    exch                       % x y
+} def
 
 0 0 moveto
 tw 0 lineto
@@ -17,4 +26,16 @@ tw bdiag sub th lineto
 bdiag th lineto
 closepath stroke
 
-%tw 2 div move
+tw 0.5 mul 0 moveto
+0 th rlineto stroke
+
+/thirddivline {               % xprop
+  dup 3 div  0        diagconv moveto
+      3 div  0.8      diagconv lineto stroke
+                              %
+} def
+
+0.1 thirddivline
+1 thirddivline
+2 thirddivline
+2.9 thirddivline