Fill -> Linear Gradient: Show angle while dragging
When using the Linear Gradient fill tool, the angle of the gradient is now is shown (in the instructions at the bottom). h/t Miyagi Andel for the idea
This commit is contained in:
parent
89a164df3d
commit
e98daa5a62
4 changed files with 26 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ Copyright (c) 2002-2023
|
|||
Various contributors (see below, and AUTHORS.txt)
|
||||
https://tuxpaint.org/
|
||||
|
||||
2023.June.29 (0.9.31)
|
||||
2023.July.1 (0.9.31)
|
||||
* New Magic Tools:
|
||||
----------------
|
||||
* Loops - Draw loop-the-loops.
|
||||
|
|
@ -35,6 +35,13 @@ https://tuxpaint.org/
|
|||
* Fuzzy round erasers
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* Improvements to Fill tool:
|
||||
--------------------------
|
||||
* When using the Linear Gradient fill tool, the angle of the
|
||||
gradient is now is shown (in the instructions at the bottom).
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
h/t Miyagi Andel for the idea
|
||||
|
||||
* Other Improvements:
|
||||
-------------------
|
||||
* Saved pictures can, from the Open dialog, be copied into
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: March 7, 2023
|
||||
Last updated: July 1, 2023
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -72,4 +72,6 @@ const char *const fill_img_fnames[NUM_FILLS] = {
|
|||
DATA_PREFIX "images/fills/gradient_shaped.png"
|
||||
};
|
||||
|
||||
#define TIP_FILL_LINEAR_MOVING gettext_noop("Click and drag to fill an area with a linear gradient (from the chosen color to transparent). (Your gradient’s angle is %.0f degrees.)")
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Copyright (c) 2002-2022 by Bill Kendrick
|
||||
Copyright (c) 2002-2023 by Bill Kendrick
|
||||
bill@newbreedsoftware.com
|
||||
https://tuxpaint.org/
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - June 21, 2023
|
||||
June 14, 2002 - July 2, 2023
|
||||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
|
@ -6652,6 +6652,19 @@ static void mainloop(void)
|
|||
new_x, new_y, draw_color, sim_flood_touched);
|
||||
|
||||
update_canvas(sim_flood_x1, sim_flood_y1, sim_flood_x2, sim_flood_y2);
|
||||
|
||||
if (new_y != fill_y)
|
||||
angle = (atan2f((new_x - fill_x), (new_y - fill_y)) * 180 / M_PI) - 90.0;
|
||||
else if (new_x >= fill_x)
|
||||
angle = 0.0;
|
||||
else
|
||||
angle = 180.0;
|
||||
|
||||
if (angle < 0.0)
|
||||
angle += 360.0;
|
||||
|
||||
snprintf(angle_tool_text, sizeof(angle_tool_text), gettext(TIP_FILL_LINEAR_MOVING), floor(angle));
|
||||
draw_tux_text(TUX_GREAT, angle_tool_text, 1);
|
||||
}
|
||||
else if (cur_tool == TOOL_FILL && cur_fill == FILL_BRUSH)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue