aboutsummaryrefslogtreecommitdiff
path: root/src/MTools/Comp/MWritable.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/MTools/Comp/MWritable.pm')
-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,