From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs 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 Message-ID: <87illepmqo.fsf@gmail.com> References: <8735cj1o8l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="833"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: 58004@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 23 09:37:52 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1obdFw-000Abh-DB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 09:37:52 +0200 Original-Received: from localhost ([::1]:47810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obdFu-0002zt-Qd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Sep 2022 03:37:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obdEB-0002wv-3c for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 03:36:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obdEA-0005Kv-RH for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 03:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obdEA-0002xG-GY for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 03:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Sep 2022 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58004 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166391852511312 (code B ref -1); Fri, 23 Sep 2022 07:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2022 07:35:25 +0000 Original-Received: from localhost ([127.0.0.1]:39271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obdDZ-0002wO-0g for submit@debbugs.gnu.org; Fri, 23 Sep 2022 03:35:25 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obdDV-0002wF-Do for submit@debbugs.gnu.org; Fri, 23 Sep 2022 03:35:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obdDJ-00028u-AI for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 03:35:15 -0400 Original-Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:53185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obdDG-00050B-LY for bug-gnu-emacs@gnu.org; Fri, 23 Sep 2022 03:35:08 -0400 Original-Received: by mail-pj1-x1041.google.com with SMTP id go6so12149725pjb.2 for ; Fri, 23 Sep 2022 00:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:from:to:cc:subject:date; bh=6aR5HoQ0hbXudNQvGzNburUhZVeohZacBMCVm59a3h0=; b=bwNmMC2C7VMmTsZ3XMzP4w0mCBSlT3XKzxkfHK/cSnYvVLAuMmczhR4P7rdLiRecit Jv/7ucO/VUuIY/qQGo/kBY/AH5sWhHGVhM1sSYMmy2tTL1pgNVT686EThDKeYk0E7Wc0 o2H5kPBf2Pd3t+Z4ZfDaVonUZxn4Srhhwc15ekN2nzKFH3vJ1S1VHsNm4pAGWwaFeuBU fe6NMlgH2GbDUQD3bfTLF0Bl+NCZlpDP7L+zQTnBsiM7DN56Nc6kPKojEZypnDuA9tRs 0f8uPboH7ZN2wP00NNsG+ZelVyhrX4DJqDyChKQ8NNTzGbuEKsFlM1JhbK4vDqET3uxd dceg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:x-gm-message-state:from:to:cc:subject:date; bh=6aR5HoQ0hbXudNQvGzNburUhZVeohZacBMCVm59a3h0=; b=5hd43rUuySi7GTwZOFaIDb5hvMojNYeiSiiUHJcgNmb8QiBSer0eOJQCeIZqAECqe7 fclwoQn0qAxXDpqULmWAwzrozJ/Xvo6+Mc4yuUBEx50E9ZljpV6r+oBXpHqcWWEF05cB XT+VNRwja8VZ0Q9kXDV53O9DSBwTBhc9X7FadqD8oiPcAVjKjyXFbNSi6vIwKd/0OQ6t 8KIk5KmOJ9EnE9nrALYvLWjnoqMPerDJWkdvkSlcQhVSAzoJ9lxbMhB2Bfg+0Pmfdv8a gjGfFmo4MS8bRtCay0Fq6+Vpd56i6UI1oFBRzXtH7ct0uw7onwiMCQ81kzKeyHzV/a0K +VvA== X-Gm-Message-State: ACrzQf26/ooibFuH3eu42IBMgdszex+KdjjbUdApxeh9gcgqi1Jnvmbl tCm74Ms/VJqgrQjrqh2GvUMQQaJhjSU= X-Google-Smtp-Source: AMsMyM7JTIuaWzifzwHyZxuBG0Yl8QL3G2Db6HejUVtOPJrWGzZOK5DM3S1s4MOsYhdhX6hf40x02w== X-Received: by 2002:a17:902:be18:b0:178:b9c9:97b8 with SMTP id r24-20020a170902be1800b00178b9c997b8mr7000918pls.38.1663918504631; Fri, 23 Sep 2022 00:35:04 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id oa16-20020a17090b1bd000b001f30b100e04sm983068pjb.15.2022.09.23.00.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 00:35:03 -0700 (PDT) In-Reply-To: <8735cj1o8l.fsf@gmail.com> (Visuwesh's message of "Thu, 22 Sep 2022 19:54:10 +0530") Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=visuweshm@gmail.com; helo=mail-pj1-x1041.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243453 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=B5=E0=AE=BF=E0=AE=AF=E0=AE=BE=E0=AE=B4=E0=AE=A9=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 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. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-bounding-box-of-image-crop-more-noticeable.patch >From e2e5935e6ee26464f0a8473c7ead7f7dce5b4aae Mon Sep 17 00:00:00 2001 From: Visuwesh 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 --=-=-=--