[Top][All Lists]

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

Re: Calculate window size in pixels

From: Kevin Rodgers
Subject: Re: Calculate window size in pixels
Date: Fri, 06 May 2005 11:55:43 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Mathias Dahl wrote:
(defun window-height-pixels ()
  (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) 
    (truncate (* (window-height) line-pixel-height-ratio))))

(defun window-width-pixels ()
  (let ((column-pixel-width-ratio (/ (+ (frame-pixel-width) 0.0) 
    (truncate (* (window-width) column-pixel-width-ratio))))

I think (+ (frame-pixel-DIMENSION) 0.0) can be replaced by
(float (frame-pixel-DIMENSION))

Kevin Rodgers

reply via email to

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