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;
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); #');
}
}