chiark / gitweb /
centralise dc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Dec 2020 16:39:12 +0000 (16:39 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Dec 2020 16:39:17 +0000 (16:39 +0000)
pumpkin-books.ps.pl

index 7cb4cbb0717ac0e167473884899f8ea6a3b8f097..a2bbc73cc8e5c88597bd77db816fdb842fe01676 100755 (executable)
@@ -76,16 +76,6 @@ sub general_book ($$) { # put in a gsave
   my $o = <<END;
 tw  0  translate
 
-% diagonal conversion
-/dc {                    % xprop yprop
-    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 mul             % y x-width-at-this-height xprop
-    exch                 % x y
-} def
-
 3 setlinewidth
 0 0 0 0.2 setcmykcolor
 newpath
@@ -234,6 +224,17 @@ print <<END or die $!;
 /costfont /Heletica-BoldOblique findfont costtextsz scalefont def
 
 /rubysz 4 def
+
+% diagonal conversion
+/dc {                    % xprop yprop
+    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 mul             % y x-width-at-this-height xprop
+    exch                 % x y
+} def
+
 END
 
 print tile(