summaryrefslogtreecommitdiff
path: root/lib/App
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-08-28 19:10:41 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-08-28 19:10:41 +0200
commita9af55a5e060807411b28aba1909b6375cad5928 (patch)
treecfce776f9c5addbaa8a1afe015651f3a298eba22 /lib/App
parent1880e63fc3febe5921316555023da8004c31927e (diff)
enable antialiasing, doesn't seem to work
Diffstat (limited to 'lib/App')
-rw-r--r--lib/App/VRR/Fakedisplay.pm.PL8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/App/VRR/Fakedisplay.pm.PL b/lib/App/VRR/Fakedisplay.pm.PL
index e60c8ff..13a97cf 100644
--- a/lib/App/VRR/Fakedisplay.pm.PL
+++ b/lib/App/VRR/Fakedisplay.pm.PL
@@ -95,10 +95,11 @@ sub new {
offset_y => 0,
};
- $self->{image} = GD::Image->new($self->{width} * $self->{scale}, $self->{height} * $self->{scale});
+ $self->{image} = GD::Image->new($self->{width} * $self->{scale}, $self->{height} * $self->{scale}, 1);
$self->{color}->{bg} = $self->{image}->colorAllocate(0, 0, 0);
$self->{color}->{fg} = $self->{image}->colorAllocate(@{$opt{color} // [255, 0, 0]});
+ $self->{image}->setAntiAliased($self->{color}->{fg});
$self->{image}->filledRectangle(0, 0, ($self->{width} * $self->{scale}) -1,
($self->{height} * $self->{scale}) - 1, $self->{color}->{bg});
@@ -126,9 +127,6 @@ sub draw_at {
my $im = $self->{image};
my $font = $self->{font};
- my $c_bg = $self->{color}{bg};
- my $c_fg = $self->{color}{fg};
-
my $font_idx = $self->{font_idx};
my $scale = $self->{scale};
@@ -153,7 +151,7 @@ sub draw_at {
$im->filledEllipse(
($off_x + $x) * $scale, ($off_y + $y) * $scale,
$scale, $scale,
- $c_fg
+ gdAntiAliased
);
}
}