aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorEli Zaretskii2019-06-29 14:51:41 +0300
committerEli Zaretskii2019-06-29 14:51:41 +0300
commit74a5a332fee8a346cf65ed6656c1b08dc1df5fde (patch)
tree9b6488ab0dccc372c643f5b521e731f26886cfb4 /etc
parent67b50770c050c55a26cd13b9568b01a80a449885 (diff)
downloademacs-74a5a332fee8a346cf65ed6656c1b08dc1df5fde.tar.gz
emacs-74a5a332fee8a346cf65ed6656c1b08dc1df5fde.zip
Support native image transforms on MS-Windows
This changeset also rearranges native image transform code for other platforms to make it cleaner, and also removes the support for native cropping. For the discussions, see https://lists.gnu.org/archive/html/emacs-devel/2019-06/msg00242.html * src/w32term.c (w32_image_rotations_p, transform): New functions. (w32_draw_image_foreground): If image rotation is requested and supported, call PlgBlt to transform the image. (w32_initialize): Populate the PlgBlt function pointer if it is supported. * src/w32term.h (w32_image_rotations_p): Add prototype. * src/dispextern.h (struct image) [HAVE_NTGUI]: New member xform. * src/image.c (compute_image_rotation): Renamed from image_set_rotation. Only compute and returns the rotation angle; leave the matrix calculation for later. Log an error message if the :rotation parameter is not a number. (image_set_crop): Function deleted. We no longer support native cropping, as one can display an image slice instead. (image_set_transform): Compute the transform matrix in its entirety here, in two variants: one for XRender and Cairo, the other for NS and MS-Windows. call compute_image_size and compute_image_rotation internally. (lookup_image) [HAVE_NATIVE_TRANSFORMS]: Call only image_set_transform. No need to pass the transform matrix to image_set_transform. (Fimage_transforms_p): Return a list of transform capabilities rather than a simple boolean. Support TTY frames as well. * src/nsimage.m (setTransform:): Don't invert the matrix, as it is already inverted in image.c. * test/manual/image-transforms-tests.el (test-cropping): State in the text that only ImageMagick supports cropping. * doc/lispref/display.texi (Image Descriptors): Update the documentation of native image transforms. (ImageMagick Images): Move the description of ':crop' here. * etc/NEWS: Minor copyedits of the feature announcement.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 864eb8c1100..abbece374a4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2214,13 +2214,13 @@ the process. That way 'make-process' can start remote processes.
2214 2214
2215+++ 2215+++
2216** Emacs now supports resizing and rotating images without ImageMagick. 2216** Emacs now supports resizing and rotating images without ImageMagick.
2217All modern systems are supported by this feature. (On GNU and Unix 2217All modern systems support this feature. (On GNU and Unix systems,
2218systems, Cairo drawing or the XRender extension to X11 is required for 2218Cairo drawing or the XRender extension to X11 is required for this to
2219this to be available; the configure script will test for it and, if 2219be available; the configure script will test for it and, if found,
2220found, enable scaling.) 2220enable scaling.)
2221 2221
2222The new function 'image-transforms-p' can be used to test whether any 2222The new function 'image-transforms-p' can be used to test whether any
2223given frame supports this capability. 2223given frame supports these capabilities.
2224 2224
2225+++ 2225+++
2226** '(locale-info 'paper)' now returns the paper size on systems that support it. 2226** '(locale-info 'paper)' now returns the paper size on systems that support it.