aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVisuwesh2022-09-23 18:11:25 +0200
committerLars Ingebrigtsen2022-09-23 18:11:25 +0200
commitcf27fe0238f88e2aee972334be75962f438cfa94 (patch)
treee824d62b9ae40fa7598d5ae1cd001b77e1685b72
parent75b3f4d0ac00bf47459629615ab2246c8a34b4c6 (diff)
downloademacs-cf27fe0238f88e2aee972334be75962f438cfa94.tar.gz
emacs-cf27fe0238f88e2aee972334be75962f438cfa94.zip
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).
-rw-r--r--lisp/image/image-crop.el16
1 files changed, 4 insertions, 12 deletions
diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el
index 61ed7e1db17..7fbbf85f939 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
357 ((memq (car event) '(mouse-1 drag-mouse-1)) 357 ((memq (car event) '(mouse-1 drag-mouse-1))
358 (setq state 'move-unclick 358 (setq state 'move-unclick
359 prompt (format "Click to move for %s" op))))))))) 359 prompt (format "Click to move for %s" op)))))))))
360 do (svg-line svg (cl-getf area :left) (cl-getf area :top) 360 do (svg-rectangle svg (cl-getf area :left) (cl-getf area :top)
361 (cl-getf area :right) (cl-getf area :top) 361 (image-crop--width area) (image-crop--height area)
362 :id "top-line" :stroke-color "white") 362 :stroke-color "red" :stroke-width 2
363 (svg-line svg (cl-getf area :left) (cl-getf area :bottom) 363 :fill-opacity 0.3 :fill "black" :id "rect")
364 (cl-getf area :right) (cl-getf area :bottom)
365 :id "bottom-line" :stroke-color "white")
366 (svg-line svg (cl-getf area :left) (cl-getf area :top)
367 (cl-getf area :left) (cl-getf area :bottom)
368 :id "left-line" :stroke-color "white")
369 (svg-line svg (cl-getf area :right) (cl-getf area :top)
370 (cl-getf area :right) (cl-getf area :bottom)
371 :id "right-line" :stroke-color "white")
372 while (not (member event '(return ?q))) 364 while (not (member event '(return ?q)))
373 finally (return (and (eq event 'return) 365 finally (return (and (eq event 'return)
374 area))))) 366 area)))))