aboutsummaryrefslogtreecommitdiff
path: root/src/MTools
diff options
context:
space:
mode:
authorcaramel2007-07-27 12:56:18 +0000
committercaramel2007-07-27 12:56:18 +0000
commit4abd3914c9c8a88d1da3dbd853314eb9573ac516 (patch)
tree8cef580016a9c98f17adee3e3101cd6a3d69eb94 /src/MTools
parent4fd9ef49bb8f41ec1583dda78d424ded7f929556 (diff)
downloadmtc-4abd3914c9c8a88d1da3dbd853314eb9573ac516.zip
mtc-4abd3914c9c8a88d1da3dbd853314eb9573ac516.tar.gz
mtc-4abd3914c9c8a88d1da3dbd853314eb9573ac516.tar.bz2
mtc-4abd3914c9c8a88d1da3dbd853314eb9573ac516.tar.xz
Modification transparente pour le changement de couleur
Diffstat (limited to 'src/MTools')
-rw-r--r--src/MTools/Comp/MWritable.pm15
1 files changed, 9 insertions, 6 deletions
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,