diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-20 11:18:31 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-20 11:18:31 +0200 |
commit | bd0b96d25295c1d29186d4a96a2215ab0239c64c (patch) | |
tree | a324fb32828c124d9fef2587ac50c672ed44203a /doc/lispref/display.texi | |
parent | 1172c7303dbce015d12424739a56bfce00e195b1 (diff) | |
download | emacs-bd0b96d25295c1d29186d4a96a2215ab0239c64c.tar.gz emacs-bd0b96d25295c1d29186d4a96a2215ab0239c64c.tar.bz2 emacs-bd0b96d25295c1d29186d4a96a2215ab0239c64c.zip |
Allow using :width/:height as normal with xbm images
* doc/lispref/display.texi (XBM Images): Adjust the documentation.
* src/image.c (enum xbm_keyword_index): Add :data-width and
:data-height.
(xbm_format): Ditto.
(xbm_image_p): Allow passing in :width/:height for display.
(xbm_load): Use :data-width/:data-height.
Diffstat (limited to 'doc/lispref/display.texi')
-rw-r--r-- | doc/lispref/display.texi | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 958eede9771..3d1d9e24dd5 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5930,13 +5930,10 @@ There are three formats you can use for @var{data}: @itemize @bullet @item A vector of strings or bool-vectors, each specifying one line of the -image. Do specify @code{:height} and @code{:width}. +image. Do specify @code{:data-height} and @code{:data-width}. @item A string containing the same byte sequence as an XBM file would contain. -You must not specify @code{:height} and @code{:width} in this case, -because omitting them is what indicates the data has the format of an -XBM file. The file contents specify the height and width of the image. @item A string or a bool-vector containing the bits of the image (plus @@ -5944,26 +5941,11 @@ perhaps some extra bits at the end that will not be used). It should contain at least @w{@code{@var{stride} * @var{height}}} bits, where @var{stride} is the smallest multiple of 8 greater than or equal to the width of the image. In this case, you should specify -@code{:height}, @code{:width} and @code{:stride}, both to indicate -that the string contains just the bits rather than a whole XBM file, -and to specify the size of the image. +@code{:data-height}, @code{:data-width} and @code{:stride}, both to +indicate that the string contains just the bits rather than a whole +XBM file, and to specify the size of the image. @end itemize -@item :width @var{width} -The value, @var{width}, specifies the width of the image, in pixels. - -@item :height @var{height} -The value, @var{height}, specifies the height of the image, in pixels. - -Note that @code{:width} and @code{:height} can only be used if passing -in data that doesn't specify the width and height (e.g., a string or a -vector containing the bits of the image). @acronym{XBM} files usually -specify this themselves, and it's an error to use these two properties -on these files. Also note that @code{:width} and @code{:height} are -used by most other image formats to specify what the displayed image -is supposed to be, which usually means performing some sort of -scaling. This isn't supported for @acronym{XBM} images. - @item :stride @var{stride} The number of bool vector entries stored for each row; the smallest multiple of 8 greater than or equal to @var{width}. |