diff --git a/Makefile b/Makefile index 37a907b6d..0651cb05c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # Various contributors (see AUTHORS.txt) # http://www.tuxpaint.org/ -# June 14, 2002 - August 14, 2021 +# June 14, 2002 - September 6, 2021 # The version number, for release: @@ -285,6 +285,7 @@ CURSOR_SHAPES:=LARGE SDL_LIBS:=$(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) SDL_LIBS+=$(call linktest,SDL_image,-lSDL_image,$(SDL_LIBS)) SDL_LIBS+=$(call linktest,SDL_ttf,-lSDL_ttf,$(SDL_LIBS)) +SDL_LIBS+=$(call linktest,SDL_gfx,-lSDL_gfx,$(SDL_LIBS)) SDL_LIBS+=$(call linktest,zlib,-lz,) SDL_LIBS+=$(call linktest,libpng,$(PNG),) @@ -965,6 +966,7 @@ install-dlls: cp $(MINGW_DIR)/bin/libpng12.dll $(BIN_PREFIX); \ cp $(MINGW_DIR)/bin/SDL.dll $(BIN_PREFIX); \ cp $(MINGW_DIR)/bin/SDL_image.dll $(BIN_PREFIX); \ + cp $(MINGW_DIR)/bin/SDL_gfx.dll $(BIN_PREFIX); \ cp $(MINGW_DIR)/bin/SDL_mixer.dll $(BIN_PREFIX); \ cp $(MINGW_DIR)/bin/SDL_ttf.dll $(BIN_PREFIX); \ cp $(MINGW_DIR)/bin/libfreetype-6.dll $(BIN_PREFIX); \ @@ -1352,6 +1354,7 @@ obj: MAGIC_SDL_CPPFLAGS:=$(shell $(PKG_CONFIG) $(SDL_PCNAME) --cflags) +# FIXME: Expose SDL_rotozoom to Magic API? -bjk 2021.09.06 windows_MAGIC_SDL_LIBS:=-L/usr/local/lib $(LIBMINGW) $(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB) macos_MAGIC_SDL_LIBS:=-L/usr/local/lib $(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB) ios_MAGIC_SDL_LIBS:=$(shell $(PKG_CONFIG) $(SDL_PCNAME) --libs) -lSDL_image -lSDL_ttf $(SDL_MIXER_LIB) diff --git a/data/brushes/arrow.dat b/data/brushes/arrow.dat new file mode 100644 index 000000000..fa3c03552 --- /dev/null +++ b/data/brushes/arrow.dat @@ -0,0 +1,2 @@ +rotate +spacing=60 diff --git a/data/brushes/arrow.png b/data/brushes/arrow.png new file mode 100644 index 000000000..93f75aaa0 Binary files /dev/null and b/data/brushes/arrow.png differ diff --git a/data/brushes/arrow_compass_points.dat b/data/brushes/arrow_compass_points.dat deleted file mode 100644 index b203f3288..000000000 --- a/data/brushes/arrow_compass_points.dat +++ /dev/null @@ -1,2 +0,0 @@ -directional -spacing=80 diff --git a/data/brushes/arrow_compass_points.png b/data/brushes/arrow_compass_points.png deleted file mode 100644 index 69a9e0c80..000000000 Binary files a/data/brushes/arrow_compass_points.png and /dev/null differ diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 4c8b2289b..82572e8af 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -33,6 +33,23 @@ $Id$ * Other Improvements: ------------------- + * 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". + * FIXME: WIP -- Doesn't handle animated brushes correctly! + * 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. + (Closes https://sourceforge.net/p/tuxpaint/feature-requests/122/) + + * Replaced the "arrow_compass_points" brush with a single + arrow which can rotate at any angle, using the new + "rotational" brush feature. + * Small icons appear on brush selection buttons denoting when the brush is animated and/or directional. (Closes https://sourceforge.net/p/tuxpaint/bugs/183/) diff --git a/docs/en/EXTENDING.txt b/docs/en/EXTENDING.txt index 3ac8075d2..b24d64c5c 100644 --- a/docs/en/EXTENDING.txt +++ b/docs/en/EXTENDING.txt @@ -5,7 +5,7 @@ Copyright © 2002-2021 by various contributors; see AUTHORS. http://www.tuxpaint.org/ - May 31, 2021 + September 6, 2021 ---------------------------------------------------------------------- @@ -212,17 +212,26 @@ Brushes Add a line containing the word "directional" to the brush's data file. - Animated Directional Brushes + Rotating Brushes - You may mix both animated and directional features into one brush. - Use both options ("frames=N" and "directional"), in separate lines - in the brush's ".dat" file. + As of Tux Paint version 0.9.27, you may now create rotating brushes. + As the brush is used, it is rotated 360 degrees, depending on the + direction the brush is going. - Lay the brush out so that each 3x3 set of directional shapes are - laid out across a wide PNG image. For example, if the brush is 30x30 - and there are 5 frames, it would be 450x90. (The leftmost 150x90 - pixels of the image represent the 9 direction shapes for the first - frame, for example.) + Add a line containing the word "rotate" to the brush's data file. + + Animated Directional or Rotating Brushes + + You may mix both animated and either directional or rotating + features into one brush. Use both options desired ("frames=N" and + "directional" or "rotate"), in separate lines in the brush's ".dat" + file. + + For directional brushes, lay the brush out so that each 3x3 set of + directional shapes are laid out across a wide PNG image. For + example, if the brush is 30x30 and there are 5 frames, it would be + 450x90. (The leftmost 150x90 pixels of the image represent the 9 + direction shapes for the first frame, for example.) Place the brush image PNGs (and any data text files) in the "brushes" directory. diff --git a/docs/en/INSTALL.txt b/docs/en/INSTALL.txt index 9c1009fb9..1a7a74043 100644 --- a/docs/en/INSTALL.txt +++ b/docs/en/INSTALL.txt @@ -37,9 +37,10 @@ Requirements Lesser General Public License (LGPL). Along with libSDL, Tux Paint depends on a number of other SDL 'helper' - libraries: SDL_Image (for graphics files), SDL_TTF and (optionally) - SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for - sound effects). + libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical + functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for + True Type Font support) and, optionally, SDL_Mixer (for sound + effects). Linux/Unix Users: @@ -49,6 +50,9 @@ Requirements * libSDL: http://www.libsdl.org/ * SDL_Image: http://www.libsdl.org/projects/SDL_image/ + * SDL_gfx: + https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/ + (https://sourceforge.net/projects/sdlgfx/) * SDL_TTF: http://www.libsdl.org/projects/SDL_ttf/ * SDL_Pango: http://sourceforge.net/projects/sdlpango/ (optional) * SDL_Mixer: http://www.libsdl.org/projects/SDL_mixer/ (optional) diff --git a/docs/en/html/EXTENDING.html b/docs/en/html/EXTENDING.html index 9870aabe5..05a8da31d 100644 --- a/docs/en/html/EXTENDING.html +++ b/docs/en/html/EXTENDING.html @@ -26,7 +26,7 @@

- May 31, 2021

+ September 6, 2021


- Animated Directional Brushes

+ Rotating Brushes

- You may mix both animated and directional features into one brush. Use both options ("frames=N" and "directional"), in separate lines in the brush's ".dat" file.

+ As of Tux Paint version 0.9.27, you may now create rotating brushes. As the brush is used, it is rotated 360 degrees, depending on the direction the brush is going.

- Lay the brush out so that each 3x3 set of directional shapes are laid out across a wide PNG image. For example, if the brush is 30x30 and there are 5 frames, it would be 450x90. (The leftmost 150x90 pixels of the image represent the 9 direction shapes for the first frame, for example.)

+ Add a line containing the word "rotate" to the brush's data file.

+
+ +

+ Animated Directional or Rotating Brushes

+ +
+

+ You may mix both animated and either directional or rotating features into one brush. Use both options desired ("frames=N" and "directional" or "rotate"), in separate lines in the brush's ".dat" file.

+ +

+ For directional brushes, lay the brush out so that each 3x3 set of directional shapes are laid out across a wide PNG image. For example, if the brush is 30x30 and there are 5 frames, it would be 450x90. (The leftmost 150x90 pixels of the image represent the 9 direction shapes for the first frame, for example.)

diff --git a/docs/en/html/INSTALL.html b/docs/en/html/INSTALL.html index 80ecae469..a23df8649 100644 --- a/docs/en/html/INSTALL.html +++ b/docs/en/html/INSTALL.html @@ -107,7 +107,7 @@ Tux Paint requires the Simple DirectMedia Layer Library (libSDL), an Open Source multimedia programming library available under the GNU Lesser General Public License (LGPL).

- Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

+ Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

Linux/Unix Users:

@@ -116,6 +116,7 @@
diff --git a/docs/es_ES.UTF-8/html/INSTALL.html b/docs/es_ES.UTF-8/html/INSTALL.html index 2b2364943..41542e46d 100644 --- a/docs/es_ES.UTF-8/html/INSTALL.html +++ b/docs/es_ES.UTF-8/html/INSTALL.html @@ -107,7 +107,7 @@ Tux Paint requires the Simple DirectMedia Layer Library (libSDL), an Open Source multimedia programming library available under the GNU Lesser General Public License (LGPL).

- Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

+ Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

Linux/Unix Users:

@@ -116,6 +116,7 @@
diff --git a/docs/fr_FR.UTF-8/html/INSTALL.html b/docs/fr_FR.UTF-8/html/INSTALL.html index e0126021d..b355a7a79 100644 --- a/docs/fr_FR.UTF-8/html/INSTALL.html +++ b/docs/fr_FR.UTF-8/html/INSTALL.html @@ -107,7 +107,7 @@ Tux Paint nécessite la bibliothèque de couches DirectMedia simple (libSDL), une bibliothèque de programmation multimédia Open Source disponible sous la Licence publique générale limitée GNU (LGPL).

- Avec libSDL, Tux Paint dépend d'un certain nombre d'autres bibliothèques SDL : SDL_Image (pour les fichiers graphiques), SDL_TTF et (en option) SDL_Pango (pour la prise en charge des polices True Type) et, éventuellement, SDL_Mixer (pour les effets sonores).

+ Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

Utilisateurs de Linux/Unix :

@@ -116,6 +116,7 @@
diff --git a/docs/gl_ES.UTF-8/html/INSTALL.html b/docs/gl_ES.UTF-8/html/INSTALL.html index 2884936af..9e9ab5e1f 100644 --- a/docs/gl_ES.UTF-8/html/INSTALL.html +++ b/docs/gl_ES.UTF-8/html/INSTALL.html @@ -107,7 +107,7 @@ Tux Paint require a «Simple DirectMedia Layer Library (libSDL)», unha biblioteca de programación multimedia de código aberto dispoñíbel baixo a licenza pública GNU Lesser General Public License (LGPL).

- Xunto con libSDL, Tux Paint depende doutras bibliotecas «de axuda» de SDL: SDL_Image (para ficheiros gráficos), SDL_TTF e (opcionalmente) SDL_Pango (para compatibilidade de tipo True Type) e, opcionalmente, SDL_Mixer (para efectos de son).

+ Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

Usuarios de Linux/Unix:

@@ -116,6 +116,7 @@
diff --git a/docs/ja_JP.UTF-8/html/INSTALL.html b/docs/ja_JP.UTF-8/html/INSTALL.html index 052b61897..927ef28b4 100644 --- a/docs/ja_JP.UTF-8/html/INSTALL.html +++ b/docs/ja_JP.UTF-8/html/INSTALL.html @@ -107,7 +107,7 @@ Tux Paint requires the Simple DirectMedia Layer Library (libSDL), an Open Source multimedia programming library available under the GNU Lesser General Public License (LGPL).

- Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

+ Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).

Linux/Unix Users:

@@ -116,6 +116,7 @@