summaryrefslogtreecommitdiff
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-01-28 14:13:01 -0500
committerChong Yidong <cyd@stupidchicken.com>2011-01-28 14:13:01 -0500
commit2f224f0b1a8d826ced25a1c8b7e79987090dbd08 (patch)
tree61889efeeea7fa62436b4d9ab9e4e43ddb2f305f /lisp/image-mode.el
parent2e804fc7e740897d5ea457ca198f1aed278f395a (diff)
downloademacs-2f224f0b1a8d826ced25a1c8b7e79987090dbd08.tar.gz
* image-mode.el (image-display-size): Doc fix (Bug#7820).
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r--lisp/image-mode.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index e99bed5cd4a..74fd96e8ade 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -118,13 +118,16 @@ A winprops object has the shape (WINDOW . ALIST)."
(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))