Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Display.getCurrent().getDPI() always equals 96?
Display.getCurrent().getDPI() always equals 96? [message #436252] Thu, 13 May 2004 20:38 Go to next message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
I'm trying to get the resolution (dots per inch) of my display and I've been
using the above call. It doesn't seem to depend on my screen resolution.
Does this make sense? What should I be using?

I ddn't find anything in bugzilla.


thanks,
Jody
Re: Display.getCurrent().getDPI() always equals 96? [message #436256 is a reply to message #436252] Thu, 13 May 2004 20:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: friederich.kupzog.de

Hello Jody,

Display is a Device. Other devices, like Printer, will return other
values. Maybe on a Mac Display.getDPI will return 72. Never tested this.

I do not see any way how SWT could find out your display's resolution :)
That would mean that your monitor would provide information about it's
height and width via the VGA cable....

Hope that helped
Friederich

Jody Schofield wrote:

> I'm trying to get the resolution (dots per inch) of my display and I've been
> using the above call. It doesn't seem to depend on my screen resolution.
> Does this make sense? What should I be using?
>
> I ddn't find anything in bugzilla.
>
>
> thanks,
> Jody
>
>


--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel 0241 160696-1
Fax 0221 726670
www.kupzog.de/fkmk
Re: Display.getCurrent().getDPI() always equals 96? [message #436294 is a reply to message #436256] Fri, 14 May 2004 18:53 Go to previous message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
Right, I get it. The 96 dpi wasn't changing because that is what I had in
the desktop->preferences->settings->advanced DPI setting. Although I was
changing the screen resolution this was remaining constant. The dpi isn't
really related to the resolution, although it might be if you customize your
dpi.

"My head hurts!" :)

thanks Friederich!


"Friederich Kupzog" <friederich@kupzog.de> wrote in message
news:c80n3s$phc$1@eclipse.org...
> Hello Jody,
>
> Display is a Device. Other devices, like Printer, will return other
> values. Maybe on a Mac Display.getDPI will return 72. Never tested this.
>
> I do not see any way how SWT could find out your display's resolution :)
> That would mean that your monitor would provide information about it's
> height and width via the VGA cable....
>
> Hope that helped
> Friederich
>
> Jody Schofield wrote:
>
> > I'm trying to get the resolution (dots per inch) of my display and I've
been
> > using the above call. It doesn't seem to depend on my screen
resolution.
> > Does this make sense? What should I be using?
> >
> > I ddn't find anything in bugzilla.
> >
> >
> > thanks,
> > Jody
> >
> >
>
>
> --
> Friederich Kupzog
> Elektronik & Software
> Neusser Str. 5-7
> 50670 K
Previous Topic:Display error on Linux
Next Topic:glasspane in swt
Goto Forum:
  


Current Time: Wed Sep 25 04:28:45 GMT 2024

Powered by FUDForum. Page generated in 0.30748 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top