WIP Rotational brushes now supported

Unlike "directional" brushes, in which a 3x3 grid representing the
8 cardinal directions (45 degree steps) is used, only a single brush
image is required, and Tux Paint will rotate it between 0 and 360 degrees,
depending on the direction the mouse is going.

The brush's ".dat" file should contain a line consisting of the word
"rotate".

Note: This adds a dependency on "SDL_gfx" library (Homepage:
https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/
SourceForge project page: https://sourceforge.net/projects/sdlgfx/)
as this feature use it's "rotozoom" functionality.

WIP -- Doesn't handle animated brushes correctly yet!

Closes https://sourceforge.net/p/tuxpaint/feature-requests/122/
This commit is contained in:
Bill Kendrick 2021-09-06 23:44:35 -07:00
parent 8a97e83a7b
commit a3080eef18
27 changed files with 316 additions and 110 deletions

2
data/brushes/arrow.dat Normal file
View file

@ -0,0 +1,2 @@
rotate
spacing=60

BIN
data/brushes/arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -1,2 +0,0 @@
directional
spacing=80

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB