Mathias Dahl <[EMAIL PROTECTED]> 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:
   x-display-pixel-width
   x-display-pixel-height
)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
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
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to