>From c9345f094179372b0b83c2b6bafaf9276fd59b29 Mon Sep 17 00:00:00 2001 From: Alan Third
Date: Sun, 24 Feb 2019 11:16:42 +0000 Subject: [PATCH 2/2] Rename image scaling to image transforms * src/dispextern.h (HAVE_NATIVE_SCALING, HAVE_NATIVE_TRANSFORMS): Rename and change all relevant locations. * src/image.c (Fimage_scaling_p, Fimage_transforms_p): Rename and update all callers. --- doc/lispref/display.texi | 15 ++++++++------- etc/NEWS | 4 ++-- lisp/image.el | 2 +- src/dispextern.h | 4 ++-- src/image.c | 30 ++++++++++++++++-------------- 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index b0f1fd2676..801ab9595a 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5302,14 +5302,15 @@ Image Descriptors (@pxref{Input Focus}). @end defun address@hidden image-scaling-p &optional frame -This function returns @code{t} if @var{frame} supports image scaling. address@hidden @code{nil} or omitted means to use the selected frame -(@pxref{Input Focus}). address@hidden image-transforms-p &optional frame +This function returns @code{t} if @var{frame} supports image scaling +and rotation. @var{frame} @code{nil} or omitted means to use the +selected frame (@pxref{Input Focus}). -If image scaling is not supported, @code{:width}, @code{:height}, address@hidden:scale}, @code{:max-width} and @code{:max-height} will only be -usable through ImageMagick, if available (@pxref{ImageMagick Images}). +If image transforms are not supported, @code{:rotation}, address@hidden:width}, @code{:height}, @code{:scale}, @code{:max-width} and address@hidden:max-height} will only be usable through ImageMagick, if +available (@pxref{ImageMagick Images}). @end defun @node XBM Images diff --git a/etc/NEWS b/etc/NEWS index 3a50a51637..4cc0ccaf07 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1575,8 +1575,8 @@ systems, the XRender extension to X11 is required for this to be available; the configure script will test for it and, if found, enable scaling.) -The new function 'image-scaling-p' can be used to test whether any -given frame supports resizing. +The new function 'image-transforms-p' can be used to test whether any +given frame supports this capability. +++ ** (locale-info 'paper) now returns the paper size on systems that support it. diff --git a/lisp/image.el b/lisp/image.el index 3aa3b0aa24..42e906b3ad 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -989,7 +989,7 @@ image--get-image image)) (defun image--get-imagemagick-and-warn () - (unless (or (fboundp 'imagemagick-types) (image-scaling-p)) + (unless (or (fboundp 'imagemagick-types) (image-transforms-p)) (error "Cannot rescale images on this terminal")) (let ((image (image--get-image))) (image-flush image) diff --git a/src/dispextern.h b/src/dispextern.h index d45bc03d09..0eb7776056 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2939,7 +2939,7 @@ struct redisplay_interface #ifdef HAVE_WINDOW_SYSTEM # if defined HAVE_XRENDER || defined HAVE_NS || defined HAVE_NTGUI -# define HAVE_NATIVE_SCALING +# define HAVE_NATIVE_TRANSFORMS # define INIT_MATRIX(m) \ for (int i = 0 ; i < 3 ; i++) \ @@ -2984,7 +2984,7 @@ struct image synchronized to Pixmap. */ XImagePtr ximg, mask_img; -# ifdef HAVE_NATIVE_SCALING +# ifdef HAVE_NATIVE_TRANSFORMS /* Picture versions of pixmap and mask for compositing. */ Picture picture, mask_picture; # endif diff --git a/src/image.c b/src/image.c index f48db69a24..dcc8cd06b6 100644 --- a/src/image.c +++ b/src/image.c @@ -56,7 +56,7 @@ along with GNU Emacs. If not, see