diff options
-rwxr-xr-x | clock.pl | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -256,20 +256,20 @@ sub DrawSec { sub DrawMin { my ($pixmap, $gc, $midx, $midy, $dRadians, $dec) = @_; - $pixmap->draw_polygon($gc, 1, [ Gtk2::Gdk::Point->new($midx+$dec - 3/100 * $radius * sin($dRadians), $midy+$dec + 3/100 * $radius * cos($dRadians)), - Gtk2::Gdk::Point->new($midx+$dec - 3/100 * $radius * sin($dRadians+$PI/2), $midy+$dec + 3/100 * $radius * cos($dRadians+$PI/2)), - Gtk2::Gdk::Point->new($midx+$dec + 8/10 * $radius * sin($dRadians), $midy+$dec - 8/10 * $radius * cos($dRadians)), - Gtk2::Gdk::Point->new($midx+$dec + 3/100 * $radius * sin($dRadians+$PI/2), $midy+$dec - 3/100 * $radius * cos($dRadians+$PI/2)) - ]); + $pixmap->draw_polygon($gc, 1, $midx+$dec - 3/100 * $radius * sin($dRadians), $midy+$dec + 3/100 * $radius * cos($dRadians), + $midx+$dec - 3/100 * $radius * sin($dRadians+$PI/2), $midy+$dec + 3/100 * $radius * cos($dRadians+$PI/2), + $midx+$dec + 8/10 * $radius * sin($dRadians), $midy+$dec - 8/10 * $radius * cos($dRadians), + $midx+$dec + 3/100 * $radius * sin($dRadians+$PI/2), $midy+$dec - 3/100 * $radius * cos($dRadians+$PI/2) + ); } sub DrawHour { my ($pixmap, $gc, $midx, $midy, $dRadians, $dec) = @_; - $pixmap->draw_polygon($gc, 1, [ Gtk2::Gdk::Point->new($midx+$dec - 5/100 * $radius * sin($dRadians), $midy+$dec + 5/100 * $radius * cos($dRadians)), - Gtk2::Gdk::Point->new($midx+$dec - 5/100 * $radius * sin($dRadians+$PI/2), $midy+$dec + 5/100 * $radius * cos($dRadians+$PI/2)), - Gtk2::Gdk::Point->new($midx+$dec + 7/10 * $radius * sin($dRadians), $midy+$dec - 7/10 * $radius * cos($dRadians)), - Gtk2::Gdk::Point->new($midx+$dec + 5/100 * $radius * sin($dRadians+$PI/2), $midy+$dec - 5/100 * $radius * cos($dRadians+$PI/2)) - ]); + $pixmap->draw_polygon($gc, 1, $midx+$dec - 5/100 * $radius * sin($dRadians), $midy+$dec + 5/100 * $radius * cos($dRadians), + $midx+$dec - 5/100 * $radius * sin($dRadians+$PI/2), $midy+$dec + 5/100 * $radius * cos($dRadians+$PI/2), + $midx+$dec + 7/10 * $radius * sin($dRadians), $midy+$dec - 7/10 * $radius * cos($dRadians), + $midx+$dec + 5/100 * $radius * sin($dRadians+$PI/2), $midy+$dec - 5/100 * $radius * cos($dRadians+$PI/2) + ); } sub DrawTickAt { @@ -288,7 +288,7 @@ sub DrawPointAt { my ($pixmap, $black_gc, $nHour, $cx, $cy) = @_; my $dRadians = $nHour * $PI / 30; - $pixmap->draw_point($black_gc, + Gtk2::Gdk::Drawable::draw_points($pixmap, $black_gc, $cx + 95/100 * $radius * sin($dRadians), $cy - 95/100 * $radius * cos($dRadians)) } |