diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-07-10 15:47:16 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-07-10 15:47:16 +0000 |
commit | e2de94ddf7ee9b2cb9e49221dfffceb99de05735 (patch) | |
tree | b8d15e963b014a78238552ec974919eacc29a420 /clock.pl | |
parent | cfb10c51005437790552c913a626e83f6d366e64 (diff) | |
download | control-center-e2de94ddf7ee9b2cb9e49221dfffceb99de05735.tar control-center-e2de94ddf7ee9b2cb9e49221dfffceb99de05735.tar.gz control-center-e2de94ddf7ee9b2cb9e49221dfffceb99de05735.tar.bz2 control-center-e2de94ddf7ee9b2cb9e49221dfffceb99de05735.tar.xz control-center-e2de94ddf7ee9b2cb9e49221dfffceb99de05735.zip |
make it work with gtk2-perl-xs
Diffstat (limited to 'clock.pl')
-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)) } |