Stamp rotation - Warp mouse to the right, at start
...this ensures that any immediate mouse movement at the beginning of the rotation process will affect the angle only slightly. (As opposed to leaving it in the center of the stamped shape; moving slightly left would rotate the shape ~180 degrees immediately, for example). Also, updated date in CHANGES and src/tuxpaint.c, added new feature to CHANGES, and credited Pere. (Great work!!!)
This commit is contained in:
parent
366863fad3
commit
c171500d5e
2 changed files with 17 additions and 3 deletions
|
|
@ -7,7 +7,14 @@ Various contributors (see below, and AUTHORS.txt)
|
|||
http://www.tuxpaint.org/
|
||||
|
||||
|
||||
2022.July.7 (0.9.29)
|
||||
2022.September.2 (0.9.29)
|
||||
* Improvements to "Stamp" tool:
|
||||
-----------------------------
|
||||
* WIP - Stamps may now be rotated.
|
||||
Use the "--stamp-rotation" option. FIXME: Likely to
|
||||
become default, with a "--no..." option.
|
||||
Pere Pujal i Carabantes <perepujal@gmail.com>
|
||||
|
||||
* Bug Fixes:
|
||||
----------
|
||||
* Opening and immediately dismissing Color Mixer could cause
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - July 7, 2022
|
||||
June 14, 2002 - September 2, 2022
|
||||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
|
@ -5811,6 +5811,13 @@ static void mainloop(void)
|
|||
{
|
||||
if (stamp_rotation)
|
||||
{
|
||||
/* Going through stamp rotation step, first */
|
||||
|
||||
/* Warp mouse to the far right of the stamp,
|
||||
where we'll start at 0-degrees of rotation */
|
||||
SDL_WarpMouse(old_x + active_stamp->w, old_y);
|
||||
do_setcursor(cursor_rotate);
|
||||
|
||||
stamp_tool_mode = STAMP_TOOL_MODE_ROTATE;
|
||||
stamp_place_x = old_x;
|
||||
stamp_place_y = old_y;
|
||||
|
|
@ -5835,7 +5842,7 @@ static void mainloop(void)
|
|||
}
|
||||
else if (stamp_tool_mode == STAMP_TOOL_MODE_ROTATE)
|
||||
{
|
||||
/* Draw a stamp! */
|
||||
/* Draw a stamp (finishing rotation step)! */
|
||||
rec_undo_buffer();
|
||||
playsound(screen, 1, SND_STAMP, 1, stamp_place_x, SNDDIST_NEAR);
|
||||
int stamp_angle_rotation = 360 - brush_rotation(stamp_place_x, stamp_place_y, old_x, old_y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue