chiark / gitweb /
horiz line not below last
authorian <ian>
Tue, 7 Sep 2004 23:44:29 +0000 (23:44 +0000)
committerian <ian>
Tue, 7 Sep 2004 23:44:29 +0000 (23:44 +0000)
pcb/pcb-panelise

index 2ce47e2010ed4b29d54a882e90e1b7c0a81c43fa..ef6a5a421e9b7a0c9bb73f0e7bd50d1c2965c2c3 100755 (executable)
@@ -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); #');
        }
     }