On Sun, May 29, 2011 at 6:32 PM, Cyrille Artho <c.ar...@aist.go.jp> wrote:

>
>>    I think this is a useful addition for the cropping of images. The
>>    way I now have to crop an image is to guess some numbers, press
>>    Apply, check in the main LyX window whether it is correct, adjust
>>    the numbers, check.. and so forth.
>>    It might be useful to select the region to crop to just by using the
>>    mouse.
>>    Vincent
>>
>>
>> This is exactly what motivated me. And even after a lot of practice, it
>> still always takes a few tries to get it right.
>>
>>  The preview of figures in LyX is rather small by default, which is
> usually good because it saves space. However, I think that would make it a
> bit difficult to select the desired image region easily, because another
> pixel or two makes a big difference at a small zoom factor.
>
> So I think I would favor a pop-up window in a first implementation. This
> would also be consistent with similar dialogs (such as "Browse..."). The
> pop-up window could be activated by a "Crop..." button and have a couple of
> controls to make a precise selection of the image region easier:
>
> (1) "+"/"-" to zoom in and out.
> (2) Two half-rectangles ("corner markers") to mark the top left and bottom
> right corners? Like ┌ and ┘ (Unicode characters), or in ASCII:
>
>  ___
> |
> |
> |  (image)  |
>            |
>         ___|
>
> This design (unlike clicking and dragging to "draw" a rectangle) has the
> advantage that an existing selection can be easily adjusted.
>
>    (a) Dragging each corner changes the size of the selected region.
>    (b) A finer line marks the entire selection (maybe the corners are shown
> in bold red, the finer line as a hair line).
>    (c) With this control, panning could perhaps be implemented (in addition
> to scrolling). Panning would be activated by clicking in the center of the
> image (or just more than a certain number of pixels away from the corner
> markers). Maybe this extra function confuses users, though, who may be more
> used to using scroll bars.
>
> An alternative to 2.a) would be to make a selection by "drawing" a
> rectangle: click on the top left, and then drag the mouse to the bottom
> right. That's faster but it's not obvious how to adjust the selection.
> Obviously panning cannot be implemented in this version, as clicking and
> dragging is already used for marking the rectangle.
>
> Using two markers for corners would also allow keeping the default
> selection; in existing documents, some users may already have defined a
> bounding box. In the "drawing" approach, the existing selection is lost each
> time the "Crop..." button is used.
>
> Other opinions? For a first version, zooming is optional; panning is
> definitely something that can be added at the end. So a first version would
> implement 2.a) and 2.b), or the alternative to 2.a) in addition to 2.b).
>
> --
> Regards,
> Cyrille Artho - http://artho.com/
> We are all like soldiers,
> crouching behind the fortifications we have raised.
>                -- Steven Erikson, "Midnight Tides"
>

I like your preferred option as well. However, I'm starting to realize that
such a feature is well over my head, even if I'm willing to spend a lot of
time programming. I need to learn more C++ and Qt4 until I tackle such a
feature so I will have to put it on hold unless anyone else would like to
take the lead.

Thank you very much Cyrille for your suggestions!

Reply via email to