Re: Background image for a window



On Wed, Feb 16, 2005 at 08:13:24AM -0500, muppet wrote in a legally binding way:
Date: Wed, 16 Feb 2005 08:13:24 -0500
From: muppet <scott asofyet org>
Organization:
To: Chris Debenham Sun COM
Subject: Re: Background image for a window

On Thu, 2005-02-10 at 20:43, muppet wrote:
On Feb 10, 2005, at 8:06 PM, Chris Debenham - PTS Engineer wrote:
Is there any other way?

Maybe.  Need more info.  What are you trying to make?  (Especially 
intriguing since you say GnomeCanvas is too slow for this purpose...)

ping... did that work for you?

pong... tried it this morning on the train into the office and yep, it
worked.
I have it doing the following:

my $pixbuf_loader = Gtk2::Gdk::PixbufLoader->new();
$pixbuf_loader->set_size($config->{'Width'},$config->{'Height'});
eval { $pixbuf_loader->write($row->{'data'}); };
eval { $pixbuf_loader->close() };
my $pixbuf=$pixbuf_loader->get_pixbuf();
$pixbuf->save($globals->{'bg_file'},'png');
my $rc_style = Gtk2::RcStyle->new;
$rc_style->bg_pixmap_name ('normal', $globals->{'bg_file'});
$window->modify_style ($rc_style);

Loads the image fine, scales it to screen size then displays.

Thanks
  Chris


-- 
muppet <scott at asofyet dot org>


-- 
-------------------------------------------------------------------------------
  ,-_|\  PTS Engineer                        E-mail : chris debenham sun com
 /     \ Sun Microsystems Australia Pty Ltd. Direct : +61 (2) 9844 5188
 \_,-\_* 828 Pacific Highway                 Phone  : +61 (2) 9844 5000
      v  Gordon, N.S.W. 2072                 Fax    : +61 (2) 9844 5189
                                             Mobile : +61 (40) 9844 514
-------------------------------------------------------------------------------
Avoid Reality At All Costs.



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