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).
This commit is contained in:
Visuwesh 2022-09-23 18:11:25 +02:00 committed by Lars Ingebrigtsen
parent 75b3f4d0ac
commit cf27fe0238

View file

@ -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)))))