iBrush rotation now snap cursor in an useful way (to fixed angles)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1582 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -958,6 +958,10 @@ void Rotate_brush_1_5(void)
|
||||
Operation_pop(&old_y);
|
||||
Operation_pop(&old_x);
|
||||
|
||||
// On corrige les coordonnées de la ligne si la touche shift est appuyée...
|
||||
if(SDL_GetModState() & KMOD_SHIFT)
|
||||
Clamp_coordinates_regular_angle(Brush_rotation_center_X,Brush_rotation_center_Y,&Paintbrush_X,&Paintbrush_Y);
|
||||
|
||||
if ( (Paintbrush_X!=old_x) || (Paintbrush_Y!=old_y) || (prev_state!=2) )
|
||||
{
|
||||
if ( (Brush_rotation_center_X==Paintbrush_X)
|
||||
@@ -1021,6 +1025,10 @@ void Rotate_brush_0_5(void)
|
||||
Operation_pop(&old_y);
|
||||
Operation_pop(&old_x);
|
||||
|
||||
// On corrige les coordonnées de la ligne si la touche shift est appuyée...
|
||||
if(SDL_GetModState() & KMOD_SHIFT)
|
||||
Clamp_coordinates_regular_angle(Brush_rotation_center_X,Brush_rotation_center_Y,&Paintbrush_X,&Paintbrush_Y);
|
||||
|
||||
if ((Paintbrush_X!=old_x) || (Paintbrush_Y!=old_y) || (prev_state!=3))
|
||||
{
|
||||
if ( (Brush_rotation_center_X==Paintbrush_X)
|
||||
|
||||
Reference in New Issue
Block a user