[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103008: * image-mode.el (image-displ
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103008: * image-mode.el (image-display-size): Doc fix (Bug#7820). |
Date: |
Fri, 28 Jan 2011 14:13:01 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103008
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Fri 2011-01-28 14:13:01 -0500
message:
* image-mode.el (image-display-size): Doc fix (Bug#7820).
modified:
lisp/ChangeLog
lisp/image-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-01-27 19:45:44 +0000
+++ b/lisp/ChangeLog 2011-01-28 19:13:01 +0000
@@ -1,3 +1,7 @@
+2011-01-28 Chong Yidong <address@hidden>
+
+ * image-mode.el (image-display-size): Doc fix (Bug#7820).
+
2011-01-27 Sam Steingold <address@hidden>
* midnight.el (clean-buffer-list-kill-never-buffer-names): Remove
=== modified file 'lisp/image-mode.el'
--- a/lisp/image-mode.el 2011-01-25 04:08:28 +0000
+++ b/lisp/image-mode.el 2011-01-28 19:13:01 +0000
@@ -118,13 +118,16 @@
(declare-function image-size "image.c" (spec &optional pixels frame))
(defun image-display-size (spec &optional pixels frame)
- "Wrapper around `image-size', to handle slice display properties.
-If SPEC is an image display property, call `image-size' with the
-given arguments.
-If SPEC is a list of properties containing `image' and `slice'
-properties, calculate the display size from the slice property.
-If SPEC contains `image' but not `slice', call `image-size' with
-the specified image."
+ "Wrapper around `image-size', handling slice display properties.
+Like `image-size', the return value is (WIDTH . HEIGHT).
+WIDTH and HEIGHT are in canonical character units if PIXELS is
+nil, and in pixel units if PIXELS is non-nil.
+
+If SPEC is an image display property, this function is equivalent
+to `image-size'. If SPEC is a list of properties containing
+`image' and `slice' properties, return the display size taking
+the slice property into account. If the list contains `image'
+but not `slice', return the `image-size' of the specified image."
(if (eq (car spec) 'image)
(image-size spec pixels frame)
(let ((image (assoc 'image spec))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103008: * image-mode.el (image-display-size): Doc fix (Bug#7820).,
Chong Yidong <=