pixmaps



Hello All!

  How I can create pixmap from data or file?
  In perl-Gtk, I maked so:

  my $button = new Gtk::Button();
  my $style = $button->get_style;
  my ($pixmap, $mask) = Gtk::Gdk::Pixmap->create_from_xpm(
                     $w->window,
                     $style->bg('normal'),
                     $fname);

  my $xpm = new Gtk::Pixmap($pixmap, $mask);
  $button->add($xpm);

But, In perl-Gtk2 this code is not worked!
In included examples I see:

my $button = Gtk2::Button->new();

and

my $style = $button->get_default_style();
(I don't understand, why get_style() is not works?)

But, there is no pixmap creation examples!

Help me, please!

With best wishes,
Victor Vislobokov.
Perm. Russia




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