From 230de84cb1ec0c6107a7621609867ba4c4d360e6 Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 31 May 2008 21:51:17 +0000 Subject: [PATCH] invert the diagram as we have inverted the table --- layout/Makefile | 22 ++++++++++++---------- layout/layout | 15 ++++++++++++--- layout/make-dgram-make | 2 +- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/layout/Makefile b/layout/Makefile index e7a216f..982d1b4 100644 --- a/layout/Makefile +++ b/layout/Makefile @@ -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 diff --git a/layout/layout b/layout/layout index 40e7235..c589213 100755 --- a/layout/layout +++ b/layout/layout @@ -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) { diff --git a/layout/make-dgram-make b/layout/make-dgram-make index 039a983..44c9002 100755 --- a/layout/make-dgram-make +++ b/layout/make-dgram-make @@ -5,7 +5,7 @@ echo '# autogenerated' while read dgram args; do cat <\$@.new + printf '#!/bin/sh -ex\n\$(LAYOUT) "\$\$@" %s \$<\n' "$args" >\$@.new chmod +x \$@.new && mv -f \$@.new \$@ END -- 2.30.2