From: ian Date: Tue, 7 Sep 2004 23:44:29 +0000 (+0000) Subject: horiz line not below last X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=df0eea430e892a534841b17e6828b8ae1b177e64;p=trains.git horiz line not below last --- diff --git a/pcb/pcb-panelise b/pcb/pcb-panelise index 2ce47e2..ef6a5a4 100755 --- a/pcb/pcb-panelise +++ b/pcb/pcb-panelise @@ -174,19 +174,20 @@ sub define_identical_end () { undef $accumulate; } -our (@thisextent); +our (@thisextent, @last_horizline); our ($netlist_aside,$netlist_data); our ($layer,$layer_aside,%layer_name,%layer_data); -sub horizline ($) { - my ($y) = @_; +sub horizline { + my ($xlhs,$xrhs,$y) = @_; $layer_data{10} .= "\tLine[". - "$xpos $y $thisextent[0] $y $cutlinewidth 0 0x00000020". + "$xlhs $y $xrhs $y $cutlinewidth 0 0x00000020". "]\n"; } sub beginfile__ { @thisextent= (); + if (@last_horizline) { horizline(@last_horizline); } } sub op__PCB { $a[0] =~ m/^"(.+)"$/ or die; @@ -196,17 +197,17 @@ sub op__PCB { transform(0,@thisextent); $xmax= $xpos + $thisextent[0] if $xpos + $thisextent[0] > $xmax; $ymax= $thisextent[1] if $thisextent[1] > $ymax; - if (length $spaces) { horizline($ypos); } + if (length $spaces) { horizline($xpos,$thisextent[0],$ypos); } } sub endfile__ { if (@ARGV) { - horizline($thisextent[1]); + @last_horizline= ($xpos,$thisextent[0],$thisextent[1]); if ($idstring_size && !length $spaces) { $layer_data{10} .= sprintf ("\tText[%d %d %d %d \"%s\" 0x%08lx]", $xpos+$gap, $thisextent[1] + $idstring_size * 10, - 0, $idstring_size, - 'assembled by $Id$', + 0, $idstring_size, 'assembled by '. + '$Id$', 0); #'); } }