diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/display.texi | 60 |
1 files changed, 37 insertions, 23 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 217df3b2cc2..c95f2df0fb8 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -5188,24 +5188,6 @@ values. If both @code{:scale} and @code{:height}/@code{:width} are | |||
| 5188 | specified, the height/width will be adjusted by the specified scaling | 5188 | specified, the height/width will be adjusted by the specified scaling |
| 5189 | factor. | 5189 | factor. |
| 5190 | 5190 | ||
| 5191 | @item :crop @var{geometry} | ||
| 5192 | This should be a list of the form @code{(@var{width} @var{height} | ||
| 5193 | @var{x} @var{y})}. @var{width} and @var{height} specify the width | ||
| 5194 | and height of the cropped image. If @var{x} is a positive number it | ||
| 5195 | specifies the offset of the cropped area from the left of the original | ||
| 5196 | image, and if negative the offset from the right. If @var{y} is a | ||
| 5197 | positive number it specifies the offset from the top of the original | ||
| 5198 | image, and if negative from the bottom. If @var{x} or @var{y} are | ||
| 5199 | @code{nil} or unspecified the crop area will be centred on the | ||
| 5200 | original image. | ||
| 5201 | |||
| 5202 | If the crop area is outside or overlaps the edge of the image it will | ||
| 5203 | be reduced to exclude any areas outside of the image. This means it | ||
| 5204 | is not possible to use @code{:crop} to increase the size of the image | ||
| 5205 | by entering large @var{width} or @var{height} values. | ||
| 5206 | |||
| 5207 | Cropping is performed after scaling but before rotation. | ||
| 5208 | |||
| 5209 | @item :rotation @var{angle} | 5191 | @item :rotation @var{angle} |
| 5210 | Specifies a rotation angle in degrees. Only multiples of 90 degrees | 5192 | Specifies a rotation angle in degrees. Only multiples of 90 degrees |
| 5211 | are supported, unless the image type is @code{imagemagick}. Positive | 5193 | are supported, unless the image type is @code{imagemagick}. Positive |
| @@ -5355,16 +5337,30 @@ This function returns @code{t} if image @var{spec} has a mask bitmap. | |||
| 5355 | @end defun | 5337 | @end defun |
| 5356 | 5338 | ||
| 5357 | @defun image-transforms-p &optional frame | 5339 | @defun image-transforms-p &optional frame |
| 5358 | This function returns @code{t} if @var{frame} supports image scaling | 5340 | This function returns non-@code{nil} if @var{frame} supports image |
| 5359 | and rotation. @var{frame} @code{nil} or omitted means to use the | 5341 | scaling and rotation. @var{frame} @code{nil} or omitted means to use |
| 5360 | selected frame (@pxref{Input Focus}). | 5342 | the selected frame (@pxref{Input Focus}). The returned list includes |
| 5343 | symbols that indicate which image transform operations are supported: | ||
| 5344 | |||
| 5345 | @table @code | ||
| 5346 | @item scale | ||
| 5347 | Image scaling is supported by @var{frame} via the @code{:scale}, | ||
| 5348 | @code{:width}, @code{:height}, @code{:max-width}, and | ||
| 5349 | @code{:max-height} properties. | ||
| 5350 | @item rotate90 | ||
| 5351 | Image rotation is supported by @var{frame} if the rotation angle is an | ||
| 5352 | integral multiple of 90 degrees. | ||
| 5353 | @item rotate | ||
| 5354 | Image rotation by arbitrary angles is supported by @var{frame}. | ||
| 5355 | @item crop | ||
| 5356 | Image cropping is supported by @var{frame}. | ||
| 5357 | @end table | ||
| 5361 | 5358 | ||
| 5362 | If image transforms are not supported, @code{:rotation}, | 5359 | If image transforms are not supported, @code{:rotation}, @code{:crop}, |
| 5363 | @code{:width}, @code{:height}, @code{:scale}, @code{:max-width} and | 5360 | @code{:width}, @code{:height}, @code{:scale}, @code{:max-width} and |
| 5364 | @code{:max-height} will only be usable through ImageMagick, if | 5361 | @code{:max-height} will only be usable through ImageMagick, if |
| 5365 | available (@pxref{ImageMagick Images}). | 5362 | available (@pxref{ImageMagick Images}). |
| 5366 | @end defun | 5363 | @end defun |
| 5367 | |||
| 5368 | @node XBM Images | 5364 | @node XBM Images |
| 5369 | @subsection XBM Images | 5365 | @subsection XBM Images |
| 5370 | @cindex XBM | 5366 | @cindex XBM |
| @@ -5506,6 +5502,24 @@ The value, @var{type}, should be a symbol specifying the type of the | |||
| 5506 | image data, as found in @code{image-format-suffixes}. This is used | 5502 | image data, as found in @code{image-format-suffixes}. This is used |
| 5507 | when the image does not have an associated file name, to provide a | 5503 | when the image does not have an associated file name, to provide a |
| 5508 | hint to ImageMagick to help it detect the image type. | 5504 | hint to ImageMagick to help it detect the image type. |
| 5505 | |||
| 5506 | @item :crop @var{geometry} | ||
| 5507 | The value of @var{geometry} should be a list of the form | ||
| 5508 | @code{(@var{width} @var{height} @var{x} @var{y})}. @var{width} and | ||
| 5509 | @var{height} specify the width and height of the cropped image. If | ||
| 5510 | @var{x} is a positive number it specifies the offset of the cropped | ||
| 5511 | area from the left of the original image, and if negative the offset | ||
| 5512 | from the right. If @var{y} is a positive number it specifies the | ||
| 5513 | offset from the top of the original image, and if negative from the | ||
| 5514 | bottom. If @var{x} or @var{y} are @code{nil} or unspecified the crop | ||
| 5515 | area will be centred on the original image. | ||
| 5516 | |||
| 5517 | If the crop area is outside or overlaps the edge of the image it will | ||
| 5518 | be reduced to exclude any areas outside of the image. This means it | ||
| 5519 | is not possible to use @code{:crop} to increase the size of the image | ||
| 5520 | by entering large @var{width} or @var{height} values. | ||
| 5521 | |||
| 5522 | Cropping is performed after scaling but before rotation. | ||
| 5509 | @end table | 5523 | @end table |
| 5510 | 5524 | ||
| 5511 | @node SVG Images | 5525 | @node SVG Images |