From 4abd3914c9c8a88d1da3dbd853314eb9573ac516 Mon Sep 17 00:00:00 2001 From: caramel Date: Fri, 27 Jul 2007 12:56:18 +0000 Subject: Modification transparente pour le changement de couleur --- src/MTools/Comp/MWritable.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/MTools/Comp/MWritable.pm') diff --git a/src/MTools/Comp/MWritable.pm b/src/MTools/Comp/MWritable.pm index 2c29805..461468c 100644 --- a/src/MTools/Comp/MWritable.pm +++ b/src/MTools/Comp/MWritable.pm @@ -111,7 +111,8 @@ sub __endWrite { } sub endWrite { - my ($self) = @_; + my ($self, $color) = @_; + if (!defined $color) { $color = $self -> mget ('color'); } if (defined $self -> {__points} && @{$self -> {__points}}) { my @points = @{$self -> {__points}}; @@ -119,7 +120,7 @@ sub endWrite { 'curve', minstance ($self), [@points], - -linecolor => $self -> mget ('color'), + -linecolor => $color, -linewidth => 1, -priority => 2, -visible => 1, @@ -149,12 +150,14 @@ sub __writing { sub writing { - my ($self, $x, $y) = @_; - $self -> write ($x, $y); + my ($self, $x, $y, $color) = @_; + if (!defined $color) { $color = $self -> mget ('color'); } + $self -> write ($x, $y, $color); } sub write { - my ($self, $x, $y) = @_; + my ($self, $x, $y, $color) = @_; + if (!defined $color) { $color = $self -> mget ('color'); } my @coords; push (@{$self -> {__old_coords}}, ($x, $y)); my $list_size = @{$self -> {__old_coords}}; @@ -183,7 +186,7 @@ sub write { 'curve', minstance ($self -> {__tmp_curves}), [@coords], - -linecolor => $self -> mget ('color'), + -linecolor => $color, -linewidth => 1, -priority => 2, -visible => 1, -- cgit v1.1