aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2019-07-01 17:54:15 +0300
committerEli Zaretskii2019-07-01 17:54:15 +0300
commit6b7136a80db3cf85c187084c6aefac156cb8a388 (patch)
tree8ac7b5d74f7cad861d83790e4b05f069d6bbd39f
parent8d963ba25d6bee185f66b81bf9d49a0661bd5249 (diff)
downloademacs-6b7136a80db3cf85c187084c6aefac156cb8a388.tar.gz
emacs-6b7136a80db3cf85c187084c6aefac156cb8a388.zip
Adjust return value of image-transforms-p
* src/image.c (Fimage_transforms_p): * doc/lispref/display.texi (Image Descriptors): image-transforms-p now returns at most (scale rotate90), even if ImageMagick is available.
-rw-r--r--doc/lispref/display.texi4
-rw-r--r--src/image.c16
2 files changed, 6 insertions, 14 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index c95f2df0fb8..5fb6433c7aa 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5350,10 +5350,6 @@ Image scaling is supported by @var{frame} via the @code{:scale},
5350@item rotate90 5350@item rotate90
5351Image rotation is supported by @var{frame} if the rotation angle is an 5351Image rotation is supported by @var{frame} if the rotation angle is an
5352integral multiple of 90 degrees. 5352integral multiple of 90 degrees.
5353@item rotate
5354Image rotation by arbitrary angles is supported by @var{frame}.
5355@item crop
5356Image cropping is supported by @var{frame}.
5357@end table 5353@end table
5358 5354
5359If image transforms are not supported, @code{:rotation}, @code{:crop}, 5355If image transforms are not supported, @code{:rotation}, @code{:crop},
diff --git a/src/image.c b/src/image.c
index 1ee74bb8b72..d44a9d3dc27 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9940,30 +9940,26 @@ FRAME defaults to the selected frame.
9940The list of capabilities can include one or more of the following: 9940The list of capabilities can include one or more of the following:
9941 9941
9942 - the symbol `scale' if FRAME supports image scaling 9942 - the symbol `scale' if FRAME supports image scaling
9943 - the symbol `rotate' if FRAME supports image rotation by arbitrary angles
9944 - the symbol `rotate90' if FRAME supports image rotation only by angles 9943 - the symbol `rotate90' if FRAME supports image rotation only by angles
9945 that are integral multiples of 90 degrees 9944 that are integral multiples of 90 degrees. */)
9946 - the symbol `crop' if FRAME supports image cropping. */)
9947 (Lisp_Object frame) 9945 (Lisp_Object frame)
9948{ 9946{
9949 struct frame *f = decode_live_frame (frame); 9947 struct frame *f = decode_live_frame (frame);
9950 if (FRAME_WINDOW_P (f)) 9948 if (FRAME_WINDOW_P (f))
9951 { 9949 {
9952#ifdef HAVE_NATIVE_TRANSFORMS 9950#ifdef HAVE_NATIVE_TRANSFORMS
9953# if defined HAVE_IMAGEMAGICK 9951# if defined HAVE_IMAGEMAGICK || defined (USE_CAIRO) || defined (HAVE_NS)
9954 return list4 (Qscale, Qrotate90, Qrotate, Qcrop);
9955# elif defined (USE_CAIRO) || defined (HAVE_NS)
9956 return list2 (Qscale, Qrotate90); 9952 return list2 (Qscale, Qrotate90);
9957# elif defined (HAVE_NTGUI)
9958 return (w32_image_rotations_p ()
9959 ? list2 (Qscale, Qrotate90)
9960 : list1 (Qscale));
9961# elif defined (HAVE_X_WINDOWS) && defined (HAVE_XRENDER) 9953# elif defined (HAVE_X_WINDOWS) && defined (HAVE_XRENDER)
9962 int event_basep, error_basep; 9954 int event_basep, error_basep;
9963 9955
9964 if (XRenderQueryExtension (FRAME_X_DISPLAY (f), 9956 if (XRenderQueryExtension (FRAME_X_DISPLAY (f),
9965 &event_basep, &error_basep)) 9957 &event_basep, &error_basep))
9966 return list2 (Qscale, Qrotate90); 9958 return list2 (Qscale, Qrotate90);
9959# elif defined (HAVE_NTGUI)
9960 return (w32_image_rotations_p ()
9961 ? list2 (Qscale, Qrotate90)
9962 : list1 (Qscale));
9967# endif 9963# endif
9968#endif 9964#endif
9969 } 9965 }