unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: emacs-devel@gnu.org
Subject: Re: Marking squares
Date: Sat, 02 Feb 2013 09:26:41 +0100	[thread overview]
Message-ID: <m3k3qr5dfi.fsf@chopper.vpn.verona.se> (raw)
In-Reply-To: <m3boc3fn34.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Sat, 02 Feb 2013 03:47:59 +0100")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> I'm contemplating implementing a very, very simple image editor in
> Emacs, which would mainly just allow image cropping.  To do that, it
> would be nice if `mouse-drag-region' would allow highlighting a "box"
> instead of the lines between mark and the mouse position.
>
> So my question is -- does Emacs have an option of highlighting
> rectangles instead of "the region"?  It might be useful when using
> commands like `C-x r k', too, perhaps.
>
> I've looked at the code, but I can't find anything obvious
> immediately...

I'm not sure if it's relevant but heres my approach:
https://github.com/jave/dragbox

You view the image wrapped in SVG. Then you can mark a region, drawn
with a svg rectangle, using the mouse. Then you can use the region for
whatever purpose. I use it to select regions for OCR.

-- 
Joakim Verona



  parent reply	other threads:[~2013-02-02  8:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02  2:47 Marking squares Lars Magne Ingebrigtsen
2013-02-02  3:06 ` Xue Fuqiao
2013-02-02  8:08   ` Xue Fuqiao
2013-02-02  8:37   ` Eli Zaretskii
2013-02-02 10:02     ` Xue Fuqiao
2013-02-02  7:06 ` Thierry Volpiatto
2013-02-02  8:26 ` joakim [this message]
2013-02-02  8:35 ` Eli Zaretskii

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=m3k3qr5dfi.fsf@chopper.vpn.verona.se \
    --to=joakim@verona.se \
    --cc=emacs-devel@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).