[Top][All Lists]

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

Re: Calculate window size in pixels

From: Pascal Bourguignon
Subject: Re: Calculate window size in pixels
Date: Fri, 06 May 2005 12:40:12 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Mathias Dahl <address@hidden> writes:

> Is it possible to calculate an Emacs window's size in pixels?
> `window-height' and `window-width' returns lines and columns.
> I guess this have to do with the frame's default font or
> something. Having two functions, `window-height-pixels' and
> `window-width-pixels' would be nice :)
> Can it be done?
> The reason that I want this is to be able to figure out to what size I
> have to resize an image to before inserting it into a window, so that
> it fits snugly.

It depends on the window manager.  With X, (when (eq window-system 'x) 
you'd use:

__Pascal Bourguignon__           
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay

reply via email to

[Prev in Thread] Current Thread [Next in Thread]