From 6b7136a80db3cf85c187084c6aefac156cb8a388 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 1 Jul 2019 17:54:15 +0300 Subject: [PATCH] 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. --- doc/lispref/display.texi | 4 ---- src/image.c | 16 ++++++---------- 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}, @item rotate90 Image rotation is supported by @var{frame} if the rotation angle is an integral multiple of 90 degrees. -@item rotate -Image rotation by arbitrary angles is supported by @var{frame}. -@item crop -Image cropping is supported by @var{frame}. @end table If 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. The list of capabilities can include one or more of the following: - the symbol `scale' if FRAME supports image scaling - - the symbol `rotate' if FRAME supports image rotation by arbitrary angles - the symbol `rotate90' if FRAME supports image rotation only by angles - that are integral multiples of 90 degrees - - the symbol `crop' if FRAME supports image cropping. */) + that are integral multiples of 90 degrees. */) (Lisp_Object frame) { struct frame *f = decode_live_frame (frame); if (FRAME_WINDOW_P (f)) { #ifdef HAVE_NATIVE_TRANSFORMS -# if defined HAVE_IMAGEMAGICK - return list4 (Qscale, Qrotate90, Qrotate, Qcrop); -# elif defined (USE_CAIRO) || defined (HAVE_NS) +# if defined HAVE_IMAGEMAGICK || defined (USE_CAIRO) || defined (HAVE_NS) return list2 (Qscale, Qrotate90); -# elif defined (HAVE_NTGUI) - return (w32_image_rotations_p () - ? list2 (Qscale, Qrotate90) - : list1 (Qscale)); # elif defined (HAVE_X_WINDOWS) && defined (HAVE_XRENDER) int event_basep, error_basep; if (XRenderQueryExtension (FRAME_X_DISPLAY (f), &event_basep, &error_basep)) return list2 (Qscale, Qrotate90); +# elif defined (HAVE_NTGUI) + return (w32_image_rotations_p () + ? list2 (Qscale, Qrotate90) + : list1 (Qscale)); # endif #endif } -- 2.39.2