]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve the documentation of 'slice' display spec (bug#77384).
authorEli Zaretskii <eliz@gnu.org>
Sun, 30 Mar 2025 16:27:22 +0000 (19:27 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 8 Apr 2025 05:34:07 +0000 (07:34 +0200)
(cherry picked from commit 38fec86281efd78af24cc435307d55a00223db49)

doc/lispref/display.texi

index 19a414fa4f1c01ce2e8afa43e3fad22b935cb5fc..14c0eb82077bc65f87b8894b6505bba31012c3c1 100644 (file)
@@ -5631,12 +5631,20 @@ instead of the text that has the display specification.
 
 @item (slice @var{x} @var{y} @var{width} @var{height})
 This specification together with @code{image} specifies a @dfn{slice}
-(a partial area) of the image to display.  The elements @var{y} and
-@var{x} specify the top left corner of the slice, within the image;
-@var{width} and @var{height} specify the width and height of the
-slice.  Integers are numbers of pixels.  A floating-point number
-in the range 0.0--1.0 stands for that fraction of the width or height
-of the entire image.
+(a partial area) of the image to display.  More precisely, the
+specification should have the following form:
+
+@lisp
+ ((slice @var{x} @var{y} @var{width} @var{height}) @var{image-desc})
+@end lisp
+
+@noindent
+where @var{image-desc} is an image descriptor described above.  The
+elements @var{x} and @var{y} specify the top left corner of the slice,
+within the image; @var{width} and @var{height} specify the width and
+height of the slice.  Integers are numbers of pixels.  A floating-point
+number in the range 0.0--1.0 stands for that fraction of the width or
+height of the entire image.
 
 @item ((margin nil) @var{string})
 A display specification of this form means to display @var{string}