Re: Get screen resolution.

On Tue, 2007-10-09 at 19:28 -0500, Nik Ogura wrote:

How do I get the screen's current resolution?

There's a method somewhere... but I just... can't...

Gtk2::Gdk::Screen ...

It has get_height(), get_width(), get_resolution() ... none of which
I've used.

I think you have to do something like:

my $screen = Gtk2::Gdk::Screen->get_default;

 ... and then you can do:

my $width = $screen->get_width;

Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au

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