unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: 58004@debbugs.gnu.org
Subject: bug#58004: 29.0.50; Bounding box of image-crop is unnoticable in certain cases
Date: Fri, 23 Sep 2022 13:04:55 +0530	[thread overview]
Message-ID: <87illepmqo.fsf@gmail.com> (raw)
In-Reply-To: <8735cj1o8l.fsf@gmail.com> (Visuwesh's message of "Thu, 22 Sep 2022 19:54:10 +0530")

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

[வியாழன் செப்டம்பர் 22, 2022] Visuwesh wrote:

> Attached patch is an attempt to make the bounding box of image-crop more
> noticeable.

Revised patch attached.  I decided to make the stroke colour red since
white was not exactly noticeable, and decreased the size of stroke width
since darkening makes the bounding box noticeable enough.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-bounding-box-of-image-crop-more-noticeable.patch --]
[-- Type: text/x-diff, Size: 1888 bytes --]

From e2e5935e6ee26464f0a8473c7ead7f7dce5b4aae Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Thu, 22 Sep 2022 19:49:18 +0530
Subject: [PATCH] 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 39c5757636..1058f11102 100644
--- a/lisp/image/image-crop.el
+++ b/lisp/image/image-crop.el
@@ -349,18 +349,10 @@ image-crop--crop-image-1
 		((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)))))
-- 
2.35.1


  reply	other threads:[~2022-09-23  7:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 14:24 bug#58004: 29.0.50; Bounding box of image-crop is unnoticable in certain cases Visuwesh
2022-09-23  7:34 ` Visuwesh [this message]
2022-09-23 16:11   ` Lars Ingebrigtsen
2022-09-23 16:29     ` Visuwesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87illepmqo.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=58004@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).