Re: Calculate window size in pixels

2005-05-10 Thread Mathias Dahl
Mathias Dahl <[EMAIL PROTECTED]> writes: >> I think that `frame-char-height' and `frame-char-width' is what you >> are looking for. > That seems to be exactly what I wanted. Strange I missed it. I will > try using that instead and see how it works. It worked very well and feels much better than

Re: Calculate window size in pixels

2005-05-10 Thread Mathias Dahl
"Ehud Karni" <[EMAIL PROTECTED]> writes: > On 06 May 2005 17:40:41 +0200, Mathias Dahl wrote: >> >> (defun window-height-pixels () >> (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) >> (frame-height >> (truncate (* (window-height) line-pixel-height-ratio >> >> (defun

Re: Calculate window size in pixels

2005-05-09 Thread Ehud Karni
On 06 May 2005 17:40:41 +0200, Mathias Dahl wrote: > > (defun window-height-pixels () > (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) > (frame-height > (truncate (* (window-height) line-pixel-height-ratio > > (defun window-width-pixels () > (let ((column-pixel-widt

Re: Calculate window size in pixels

2005-05-07 Thread Mathias Dahl
Kevin Rodgers <[EMAIL PROTECTED]> writes: > Mathias Dahl wrote: > > (defun window-height-pixels () > > (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) > > (frame-height > > (truncate (* (window-height) line-pixel-height-ratio > > (defun window-width-pixels () > > (l

Re: Calculate window size in pixels

2005-05-06 Thread Kevin Rodgers
Mathias Dahl wrote: (defun window-height-pixels () (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) (frame-height (truncate (* (window-height) line-pixel-height-ratio (defun window-width-pixels () (let ((column-pixel-width-ratio (/ (+ (frame-pixel-width) 0.0) (frame-

Re: Calculate window size in pixels

2005-05-06 Thread Mathias Dahl
Mathias Dahl <[EMAIL PROTECTED]> writes: > And even better: > > (defun window-height-pixels () > (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) > (frame-height > (truncate (* (window-height) line-pixel-height-ratio > > (defun window-width-pixels () > (let ((colum

Re: Calculate window size in pixels

2005-05-06 Thread Mathias Dahl
Mathias Dahl <[EMAIL PROTECTED]> writes: > Which means I can use this: > > (defun window-height-pixels () > (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) > (frame-height))) > (column-pixel-width-ratio (/ (+ (frame-pixel-width) 0.0) > (frame-width > (ftruncat

Re: Calculate window size in pixels

2005-05-06 Thread Mathias Dahl
Stefan Monnier <[EMAIL PROTECTED]> writes: > > Is it possible to calculate an Emacs window's size in pixels? > > `window-height' and `window-width' returns lines and columns. > > There's frame-pixel-height in Emacs-CVS. > There's also window-pixel-edges if you care about windows rather > than fra

Re: Calculate window size in pixels

2005-05-06 Thread Stefan Monnier
> Is it possible to calculate an Emacs window's size in pixels? > `window-height' and `window-width' returns lines and columns. There's frame-pixel-height in Emacs-CVS. There's also window-pixel-edges if you care about windows rather than frames. Stefan __

Re: Calculate window size in pixels

2005-05-06 Thread Pascal Bourguignon
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 > `win