Re: screen resolution?
- From: Owen Taylor <otaylor gtk org>
- To: Alexander Larsson <alla lysator liu se>
- Cc: gtk-list redhat com
- Subject: Re: screen resolution?
- Date: 23 May 1998 15:32:33 -0400
Alexander Larsson <alla@lysator.liu.se> writes:
> Is there any way in gtk/gdk to get at the real resolution (in dots per inch)
> of the screen?
>
> xdpyinfo says:
> screen #0:
> dimensions: 1152x864 pixels (390x293 millimeters)
> resolution: 75x75 dots per inch
>
> I don't know how accurate this is, but at least there are some data about this
> in the x-server.
gdk_screen_width() and gdk_screen_height() return the dimensions.
A patch with similar functions to return the screen resolution
would be gladly accepted.
[ Computed from the Xlib macros Width/HeightMMOfScreen(screen) -
perhaps just gdk_screen_[width/height]_mm() functions ]
> Better use them than guessing at 72 dpi.
(GTK doesn't currently make any use of screen resolution. There
is a confusing thing where dimensions for the rulers are specified
in terms of 1/72 in. "pixels", but that has nothing to do with
the size of pixels on the screen)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]