Perl/Gtk: GdkColor support ?



Ho!

How to use GkdColor form Perl/Gtk ?

I am trying to do something like:

# ok there is no new method for Gtk::Gdk::Color ! But what to use instead ?
$color = new Gtk::Gdk::Color;

$color->blue( 65000 );
$color->red( 0 );
$color->green( 0 );

$widget->get_colormap->color_alloc( $color );

$blue_gc = new Gtk::Gdk::GC( $widget->window );
$blue_gc->set_foreground( $color );

$widget->draw_line( $blue_gc, 0, 0, 100, 100 );

Any help on how to use colors under perl/gtk is wellcome!

bb4now,
PMC




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]