emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master cf27fe0238: Make bounding box of 'image-crop' more noticeable


From: Lars Ingebrigtsen
Subject: master cf27fe0238: Make bounding box of 'image-crop' more noticeable
Date: Fri, 23 Sep 2022 12:12:02 -0400 (EDT)

branch: master
commit cf27fe0238f88e2aee972334be75962f438cfa94
Author: Visuwesh <visuweshm@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make bounding box of 'image-crop' more noticeable
    
    * lisp/image/image-crop.el (image-crop--crop-image-1): Darken the
    selected region to make the bounding-box more noticable in images
    which are mostly white (bug#58004).
---
 lisp/image/image-crop.el | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el
index 61ed7e1db1..7fbbf85f93 100644
--- a/lisp/image/image-crop.el
+++ b/lisp/image/image-crop.el
@@ -357,18 +357,10 @@ After cropping an image, you can save it by `M-x 
image-save' or
                ((memq (car event) '(mouse-1 drag-mouse-1))
                 (setq state 'move-unclick
                        prompt (format "Click to move for %s" op)))))))))
-     do (svg-line svg (cl-getf area :left) (cl-getf area :top)
-                 (cl-getf area :right) (cl-getf area :top)
-                 :id "top-line" :stroke-color "white")
-     (svg-line svg (cl-getf area :left) (cl-getf area :bottom)
-              (cl-getf area :right) (cl-getf area :bottom)
-              :id "bottom-line" :stroke-color "white")
-     (svg-line svg (cl-getf area :left) (cl-getf area :top)
-              (cl-getf area :left) (cl-getf area :bottom)
-              :id "left-line" :stroke-color "white")
-     (svg-line svg (cl-getf area :right) (cl-getf area :top)
-              (cl-getf area :right) (cl-getf area :bottom)
-              :id "right-line" :stroke-color "white")
+     do (svg-rectangle svg (cl-getf area :left) (cl-getf area :top)
+                       (image-crop--width area) (image-crop--height area)
+                       :stroke-color "red" :stroke-width 2
+                       :fill-opacity 0.3 :fill "black" :id "rect")
      while (not (member event '(return ?q)))
      finally (return (and (eq event 'return)
                          area)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]