From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Calculate window size in pixels
Date: Fri, 06 May 2005 11:55:43 -0600 [thread overview]
Message-ID: <d5gam7$dvf$1@sea.gmane.org> (raw)
In-Reply-To: <m2br7ol5vq.fsf@hotmail.com>
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-width))))
> (truncate (* (window-width) column-pixel-width-ratio))))
I think (+ (frame-pixel-DIMENSION) 0.0) can be replaced by
(float (frame-pixel-DIMENSION))
--
Kevin Rodgers
next prev parent reply other threads:[~2005-05-06 17:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 9:12 Calculate window size in pixels Mathias Dahl
2005-05-06 10:40 ` Pascal Bourguignon
2005-05-06 14:12 ` Stefan Monnier
2005-05-06 14:40 ` Klaus Straubinger
2005-05-06 15:36 ` Mathias Dahl
2005-05-06 15:40 ` Mathias Dahl
2005-05-06 17:12 ` Mathias Dahl
2005-05-06 17:55 ` Kevin Rodgers [this message]
[not found] ` <mailman.3776.1115402969.2819.help-gnu-emacs@gnu.org>
2005-05-07 17:51 ` Mathias Dahl
2005-05-09 11:02 ` Ehud Karni
[not found] ` <mailman.4226.1115637000.2819.help-gnu-emacs@gnu.org>
2005-05-10 10:28 ` Mathias Dahl
2005-05-11 6:36 ` Mathias Dahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='d5gam7$dvf$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).