chiark / gitweb /
invert the diagram as we have inverted the table
authorian <ian>
Sat, 31 May 2008 21:51:17 +0000 (21:51 +0000)
committerian <ian>
Sat, 31 May 2008 21:51:17 +0000 (21:51 +0000)
layout/Makefile
layout/layout
layout/make-dgram-make

index e7a216fed177ba49b2c16a4c6f05025719a2d393..982d1b44cdc4ae0b762fbb2cd071f4ebe8da1446 100644 (file)
@@ -3,6 +3,8 @@ include ../common.make
 
 M4INCS=                parts.i4
 
+LAYOUT=                ./layout -R270
+
 E_TRACK=       ArsCLMNo
 LAYOUTOPTS_ALL=        -ep=*Cm
 LAYOUTOPTS=    -E=*$(E_TRACK) $(LAYOUTOPTS_ALL)
@@ -99,13 +101,13 @@ compose-segenco: compose-segenco.o
                m4 -s $< $o
 
 %-a.ps:                %.d4 layout
-               ./layout <$< $(LAYOUTOPTS) '-E*lD' $o
+               $(LAYOUT) <$< $(LAYOUTOPTS) '-E*lD' $o
 
 %-al.ps:       %.d4 layout
-               ./layout <$< $(LAYOUTOPTS) '-e*C' '-ep=rm' $o
+               $(LAYOUT) <$< $(LAYOUTOPTS) '-e*C' '-ep=rm' $o
 
 %-ap.ps:       %.d4 layout
-               ./layout -S1.0 <$< $(LAYOUTOPTS) '-e*A' '-ep=rm' $o
+               $(LAYOUT) -S1.0 <$< $(LAYOUTOPTS) '-e*A' '-ep=rm' $o
 
 %.segcmapreq:  %.run-layout
                ./$< $(LAYOUTOPTS_SEGS) -GR $o
@@ -130,32 +132,32 @@ ours.graph.c:     extractgraph ours.dgram-bot.p0.segenco.ps
 # layers, should put them all in same segenco specially for extractgraph
 
 ours-l%.ps:    ours.d4 layout
-               ./layout <$< -l$* $(LAYOUTOPTS) $(XLAYOUTOPTS_LAYER) $o
+               $(LAYOUT) <$< -l$* $(LAYOUTOPTS) $(XLAYOUTOPTS_LAYER) $o
 
 ours-s%.ps:    layout ours.redacted.segjoins ours.d4
-               ./layout -l$* -e'*=*rldm' -E'=5QE' -e'segjoin=5M' \
+               $(LAYOUT) -l$* -e'*=*rldm' -E'=5QE' -e'segjoin=5M' \
                        -e'l=*C' \
                        $(filter-out layout, $^) $o
 
 ours-m%.ps:    ours.d4 layout
-               ./layout <$< -l$* -E'=*aRsclDmno' \
+               $(LAYOUT) <$< -l$* -E'=*aRsclDmno' \
                        -E'=5RNLDA' -E'*~=5rCdsml' $(LAYOUTOPTS_PS) $o
 
 ours-e%.ps:    ours.d4 layout
-               ./layout <$< -l$* -E'=*aRsclMno' \
+               $(LAYOUT) <$< -l$* -E'=*aRsclMno' \
                        -e'=5RN' -E'*~=5rsm' -e'p~=5r' -e'*=*l' \
                        -e'[sp]=*rm' $o
 
 ours-p%.ps:    ours.d4 layout
-               ./layout <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
+               $(LAYOUT) <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
                        $(LAYOUTOPTS_PHYS) $(XLAYOUTOPTS_LAYER) $o
 
 test-p%.ps:    test.d4 layout
-               ./layout <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
+               $(LAYOUT) <$< -l$$(printf %s "$*" | sed -e 's/-/ -P/') \
                        $(LAYOUTOPTS_PHYS) $(XLAYOUTOPTS_LAYER) $o
 
 parts.ps:      showlib.d4 layout
-               ./layout <$< $(LAYOUTOPTS_ALL) $o
+               $(LAYOUT) <$< $(LAYOUTOPTS_ALL) $o
 
 # test case
 t.ppm:         ours.dgram-bot.pa.segenco.ppm x.gdb subseg2display
index 40e723501a635c3e5ffb88c19d5f47283043fc32..c589213b4e3d94bea14ea3f85c08e988b954946f 100755 (executable)
@@ -20,7 +20,9 @@ our $subsegcmapreq=0;
 our $subsegmovfeatpos='f';
 our $subsegcmapangscale;
 
-our $ps_page_shift= 615;
+our $ps_page_shift_short= 615;
+our $ps_page_shift_long=  765;
+
 our $ps_page_xmul= 765.354;
 our $ps_page_ymul= 538.583;
 
@@ -29,6 +31,7 @@ our @segments= ('/');
 our @ident_strings= ();
 our %subsegcmap;
 our %segcmap;
+our $shiftrotate= "";
 
 our $drawers= 'arqscldmnoge';
 our %chdraw_emap= qw(A ARScgd
@@ -69,7 +72,13 @@ while (@ARGV && $ARGV[0] =~ m/^\-/) {
            $psu_subseglw{$1}= $2*0.1;
        } elsif (s/^GR//) { $subsegcmapreq=1; }
        elsif (s/^GP(\d+|f)$//) { $subsegmovfeatpos=$1; }
-       elsif (s/^GL(.*)$//) {
+       elsif (s/^R(0|90|180|270)$//) {
+           my $ang= $1;
+           $shiftrotate .= "  ".
+               ($ang==90 || $ang==180 ? $ps_page_shift_short : 0)." ".
+               ($ang>=180 ? $ps_page_shift_long : 0)." ".
+                   " translate  $ang rotate\n";
+       } elsif (s/^GL(.*)$//) {
            my ($sscmfn) = $1;
            my ($sscmf, $datum, $csss, $angbits);
            local ($_);
@@ -1748,7 +1757,7 @@ sub cmd__one {
 o("%!\n".
   "  /lf /Courier-New findfont $lmu_marktpt scalefont def\n".
   "  /sf /Courier-Bold findfont $lmu_segtpt scalefont def\n".
-  "  $ps_page_shift 0 translate 90 rotate\n".
+  "$shiftrotate".
   "  gsave\n");
 
 if ($page_x || $page_y) {
index 039a983c931a51f58f41c6401721154021c09351..44c90029e717d5ef6d1b840baa547fe0b1ed969e 100755 (executable)
@@ -5,7 +5,7 @@ echo '# autogenerated'
 while read dgram args; do
        cat <<END
 $stem.dgram-$dgram.run-layout: $stem.d4 layout $stem.dgram.m
-       printf '#!/bin/sh -ex\n./layout "\$\$@" %s \$<\n' "$args" >\$@.new
+       printf '#!/bin/sh -ex\n\$(LAYOUT) "\$\$@" %s \$<\n' "$args" >\$@.new
        chmod +x \$@.new && mv -f \$@.new \$@
 
 END