From 89612a6ee9f96d10a0acceef7488d08782990530 Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 16 Sep 2006 01:27:29 +0000 Subject: [PATCH] improved distance label placement when centrelines drawn --- layout/layout | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layout/layout b/layout/layout index b88ac2c..31d1daf 100755 --- a/layout/layout +++ b/layout/layout @@ -168,7 +168,8 @@ our $lmu_txtboxh= $lmu_marktpt * 1.100; our $lmu_txtboxpadx= $lmu_marktpt * 0.335; our $lmu_txtboxoff= $lmu_marklw / 2; our $lmu_txtboxlw= 1; -our $lmu_lenlabeloff= -$lmu_marklw * 1.0; +our $lmu_lenlabeloffctr= -$lmu_marklw * 1.0; +our $lmu_lenlabeloff= $lmu_marklw * 0.5; our $olu_left= 10 * $scale; our $olu_right= 217 * $scale - $olu_left; @@ -772,15 +773,18 @@ print DEBUG "ps $p0 $p1 $lenperp ($ppu)\n"; o(" stroke\n"); } if ($draw =~ m/D/) { - my ($pt,$ad,$len); + my ($pt,$ad,$len,$off); $param= ($p0+$p1)*0.5; $pt= &$calcfn; $ad= ang2deg($pt->{A}); $len= sprintf "%.0f", $lenperp * abs($p1-$p0); + $off= $draw =~ m/C/ ? $lmu_lenlabeloff : $lmu_lenlabeloffctr; ol(" gsave\n". " $pt->{X} $pt->{Y} translate\n". " $ad rotate\n". - " lf setfont 0 $lmu_lenlabeloff moveto ($len) show\n". + " lf setfont\n". + " 0 $off moveto\n". + " ($len) show\n". " grestore\n"); } return unless $draw =~ m/[ARS]/; -- 2.30.2