diff options
author | etienne | 2003-05-26 09:07:42 +0000 |
---|---|---|
committer | etienne | 2003-05-26 09:07:42 +0000 |
commit | 3d5bc14297fe0f902056d1fc1ca3b099f50b6fb5 (patch) | |
tree | d3c7567260cd8ca3c2ba706e4c34514f5f6e683a | |
parent | 6f275917de5f51535ce129605439317c77b9d91e (diff) | |
download | tkzinc-3d5bc14297fe0f902056d1fc1ca3b099f50b6fb5.zip tkzinc-3d5bc14297fe0f902056d1fc1ca3b099f50b6fb5.tar.gz tkzinc-3d5bc14297fe0f902056d1fc1ca3b099f50b6fb5.tar.bz2 tkzinc-3d5bc14297fe0f902056d1fc1ca3b099f50b6fb5.tar.xz |
Les contours multiples sont reproduits quand on reg�n�re le code.
-rw-r--r-- | Perl/Zinc/Debug.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Perl/Zinc/Debug.pm b/Perl/Zinc/Debug.pm index 09d0ae9..5bc7caa 100644 --- a/Perl/Zinc/Debug.pm +++ b/Perl/Zinc/Debug.pm @@ -514,6 +514,7 @@ sub buildItem { my $type = $zinc->type($item); my @code; my $numfields = 0; + my $numcontours = 0; # type group and initargs my $initstring = '$items{'.$item.'}=$zinc->add('.$type.', '.$group.', '; if ($type eq 'tabular' or $type eq 'track' or $type eq 'waypoint') { @@ -538,6 +539,7 @@ sub buildItem { $initstring .= join(', ', @coords); } $initstring .= " ], "; + $numcontours = $zinc->contour($item); } push(@code, $initstring); # options @@ -549,6 +551,22 @@ sub buildItem { push(@code, &buildField($zinc, $item, $i)); } } + if ($numcontours > 1) { + for (my $i=1; $i < $numcontours; $i++) { + my (@coords) = $zinc->coords($item); + my @coords2; + for my $c (@coords) { + if (@$c > 2) { + push(@coords2, '['.$c->[0].', '.$c->[1].', "'.$c->[2].'"]'); + } else { + push(@coords2, '['.$c->[0].', '.$c->[1].']'); + } + } + my $coordstr = '[ '.join(', ', @coords2).' ]'; + push(@code, '$zinc->contour($items{'.$item.'}, "add", 0, '); + push(@code, ' '.$coordstr.');'); + } + } return @code; } # end buildItem |