Page 1 of 1
[Feature Request] Dragging Square Area for Cutting
Posted: Thu Dec 19, 2013 3:45 am
by Leon Cheung
When we are going to make the cut on the image, we always make border select on the image by dragging a rectangle. But can we quickly drag out a regular square for that? For example, like hoding Ctrl or Shift when dragging. It would be very helpful and convenient. FYI. Thank you!
Re: [Feature Request] Dragging Square Area for Cutting
Posted: Fri Dec 20, 2013 9:12 am
by m.Th.
Leon Cheung wrote:When we are going to make the cut on the image, we always make border select on the image by dragging a rectangle. But can we quickly drag out a regular square for that? For example, like hoding Ctrl or Shift when dragging. It would be very helpful and convenient. FYI. Thank you!
Shift.
It is the standard dictated by Adobe's Photoshop.
At least on Windows is relatively easy to implement:
if GetAsyncKeyState(VK_SHIFT)<0 then...
Re: [Feature Request] Dragging Square Area for Cutting
Posted: Sat Dec 21, 2013 12:37 pm
by Leon Cheung
m.Th. wrote:Leon Cheung wrote:When we are going to make the cut on the image, we always make border select on the image by dragging a rectangle. But can we quickly drag out a regular square for that? For example, like hoding Ctrl or Shift when dragging. It would be very helpful and convenient. FYI. Thank you!
Shift.
It is the standard dictated by Adobe's Photoshop.
At least on Windows is relatively easy to implement:
if GetAsyncKeyState(VK_SHIFT)<0 then...
Agree. Shift would be nice. I really hope it could be implemented soon.

Re: [Feature Request] Dragging Square Area for Cutting
Posted: Tue Jan 07, 2014 11:39 am
by CreativeWorld
This works in v0.64, thanks.
Just one improvement that could be made is that,
when the left mouse button is held down and one drags out a selection,
if the mouse pointer is stationary,
and one holds down the shift key,
then nothing happens.
The mouse has to be moved (cause a drag action),
for the selection to update and get an aspect ratio of 1:1,
the same thing happens if one releases the shift key,
the selection doesn't update until the mouse is moved.
Tested with XnView MP v0.64 on linux mint 15 cinnamon 32bit.
Re: [Feature Request] Dragging Square Area for Cutting
Posted: Tue Jan 07, 2014 12:18 pm
by m.Th.
CreativeWorld wrote:This works in v0.64, thanks.
Just one improvement that could be made is that,
when the left mouse button is held down and one drags out a selection,
if the mouse pointer is stationary,
and one holds down the shift key,
then nothing happens.
The mouse has to be moved (cause a drag action),
for the selection to update and get an aspect ratio of 1:1,
the same thing happens if one releases the shift key,
the selection doesn't update until the mouse is moved.
Tested with XnView MP v0.64 on linux mint 15 cinnamon 32bit.
Rather difficult to implement. By 'difficult' I mean that It doesn't worth the effort.
He hooks the Mouse Move event and test inside of it if the Shift key is pressed. Simple and clean to implement and to maintain.
What do you want, implies a test in the main Key Press event. Hmmm... it could lead to complications, if you'd ask me.
Re: [Feature Request] Dragging Square Area for Cutting
Posted: Tue Jan 07, 2014 12:21 pm
by m.Th.
And now a
real bug here:
1. Select a square area by pressing Shift
2. By keeping the Shift pressed, try to change the selection by
dragging from other corners of the selection (particularly the bottom-left and the top-right ones)
3. Enjoy!

Re: [Feature Request] Dragging Square Area for Cutting
Posted: Mon Mar 24, 2014 4:24 pm
by xnview
See
Issue 201 for current status and details.