From a3080eef18b032376bc0e01a6b5dc775e4bb943e Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Mon, 6 Sep 2021 23:44:35 -0700 Subject: [PATCH] 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/ --- Makefile | 5 +- data/brushes/arrow.dat | 2 + data/brushes/arrow.png | Bin 0 -> 6888 bytes data/brushes/arrow_compass_points.dat | 2 - data/brushes/arrow_compass_points.png | Bin 2150 -> 0 bytes docs/CHANGES.txt | 17 +++++ docs/en/EXTENDING.txt | 29 ++++++--- docs/en/INSTALL.txt | 10 ++- docs/en/html/EXTENDING.html | 19 ++++-- docs/en/html/INSTALL.html | 3 +- docs/es_ES.UTF-8/EXTENDING.txt | 29 ++++++--- docs/es_ES.UTF-8/INSTALL.txt | 10 ++- docs/es_ES.UTF-8/html/EXTENDING.html | 19 ++++-- docs/es_ES.UTF-8/html/INSTALL.html | 3 +- docs/fr_FR.UTF-8/EXTENDING.txt | 30 ++++++--- docs/fr_FR.UTF-8/INSTALL.txt | 12 ++-- docs/fr_FR.UTF-8/html/EXTENDING.html | 19 ++++-- docs/fr_FR.UTF-8/html/INSTALL.html | 3 +- docs/gl_ES.UTF-8/EXTENDING.txt | 30 ++++++--- docs/gl_ES.UTF-8/INSTALL.txt | 12 ++-- docs/gl_ES.UTF-8/html/EXTENDING.html | 19 ++++-- docs/gl_ES.UTF-8/html/INSTALL.html | 3 +- docs/ja_JP.UTF-8/EXTENDING.txt | 29 ++++++--- docs/ja_JP.UTF-8/INSTALL.txt | 10 ++- docs/ja_JP.UTF-8/html/EXTENDING.html | 19 ++++-- docs/ja_JP.UTF-8/html/INSTALL.html | 3 +- src/tuxpaint.c | 89 +++++++++++++++++++++----- 27 files changed, 316 insertions(+), 110 deletions(-) create mode 100644 data/brushes/arrow.dat create mode 100644 data/brushes/arrow.png delete mode 100644 data/brushes/arrow_compass_points.dat delete mode 100644 data/brushes/arrow_compass_points.png 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 0000000000000000000000000000000000000000..93f75aaa078f2fe8d197b76fdb5cadae614e6e26 GIT binary patch literal 6888 zcmeHKc{r5q_n#87Bqb$^F(Rrli!qpN$u?z>EKy?2JZ6TOF=i%fl&qmdh_Yl0kt~sv zr9#S*vM(WCB1!0tsC*ylec!r%-+$ig`hEXvuIrhZ=RTkFxzG8W^W4{S&YPPWZ4i_c zgg_u0@W%QU;IHD!wSFD=tuW6TgFpnAd@PS~Er^~_7Te94MhBo=Zx#RrylBo4h*$5e zL{|@~dm=&09PyHMRWgmQc{Ja=A5uP}T_|72PCwRC8{RQxttOBz7@Y3($MSODn2f)k z(2H727pBH>f2W9MPt%)~{)^t8*p&IXk?GWXZzjiP0^V2*NfhX~R=qk?{a%{qL}-ic zBGNqh?#B8#ez-QwOS-`!^!lcW&lMZmnLNB_{Dzo3A6;#+ckQ&5i4CV7Xr0LlaL8~g z(hmLFHW>WwR;}hkUjgM~1AbvPkOOCu1(Gj&43rEsZ{BrI-G;X*(OV-f`v@>Sa zIf#NYYvuo#ta$y1gPt2%Xq;5`tMHd4Nzls=s3Ak20U(DD?rb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~N3sL2Lx%PlPsV!#MYh7oeVis_Xn`FJ zSJQ|hyU3qy8@uTlc^2hqD$EZP%-~(aL65t$0S`kNy1-`UFodgxHC{v+s}Mg z$54hk+rbM%wr6hShYY5DtX=W-88>hj$9$HeH#6BBa*+?WgAXEtIL~@!Gl+H~ZW+%g zOfW!r;#wZzHIAoDzib3^OYoT7JIvy4t`hzz4Lvw=naD-7p%1g!8tlN|X$4PUE#GAT zr6QLxB4nR>XOYY3#N(`@o&@D4aC1c)wxZOSESe*V89

- 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 @@
  • 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/es_ES.UTF-8/EXTENDING.txt b/docs/es_ES.UTF-8/EXTENDING.txt index a5168c503..5ac7c7817 100644 --- a/docs/es_ES.UTF-8/EXTENDING.txt +++ b/docs/es_ES.UTF-8/EXTENDING.txt @@ -5,7 +5,7 @@ Copyright © 2002-2021 by various contributors; see AUTHORS. http://www.tuxpaint.org/ - mayo 31, 2021 + septiembre 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/es_ES.UTF-8/INSTALL.txt b/docs/es_ES.UTF-8/INSTALL.txt index 91c81f301..e65bc8c9a 100644 --- a/docs/es_ES.UTF-8/INSTALL.txt +++ b/docs/es_ES.UTF-8/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/es_ES.UTF-8/html/EXTENDING.html b/docs/es_ES.UTF-8/html/EXTENDING.html index 2533fd4be..2ffe8ffcc 100644 --- a/docs/es_ES.UTF-8/html/EXTENDING.html +++ b/docs/es_ES.UTF-8/html/EXTENDING.html @@ -26,7 +26,7 @@

    - mayo 31, 2021

    + septiembre 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/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 @@
  • 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/fr_FR.UTF-8/EXTENDING.txt b/docs/fr_FR.UTF-8/EXTENDING.txt index b842624f2..964bbac74 100644 --- a/docs/fr_FR.UTF-8/EXTENDING.txt +++ b/docs/fr_FR.UTF-8/EXTENDING.txt @@ -5,7 +5,7 @@ Copyright &copie; 2002-2021 par divers contributeurs; voir AUTHORS. http://www.tuxpaint.org/ - mai 31, 2021 + septembre 6, 2021 ---------------------------------------------------------------------- @@ -230,17 +230,27 @@ Pinceaux Ajoute une ligne contenant le mot "directional" au fichier de données brosse. - Pinceaux animés orientables + Rotating Brushes - Vous pouvez mélanger animation et orientation dans un même pinceau. - Utilisez les deux options ("frames=N" et "directional") en deux - lignes séparées dans le fichier ".dat" qui concerne le pinceau. + 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. - Disposez le pinceau de manière à ce que chaque ensemble 3x3 de - formes orientables soit disposé sur une grande image PNG. Par - exemple, si le pinceau mesure 30x30 et qu'il y a 5 cadres, ce sera - 450x90. (Les 150x90 pixels les plus à gauche de l'image représentent - les 9 formes de direction pour la première image, par exemple). + Ajoute une ligne contenant le mot "rotate" au fichier de données + brosse. + + 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.) Placez les PNG de l'image du pinceau (et tous les fichiers texte de données) dans le répertoire "brushes". diff --git a/docs/fr_FR.UTF-8/INSTALL.txt b/docs/fr_FR.UTF-8/INSTALL.txt index 7245bb5e6..607843c95 100644 --- a/docs/fr_FR.UTF-8/INSTALL.txt +++ b/docs/fr_FR.UTF-8/INSTALL.txt @@ -36,10 +36,11 @@ Exigences (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 : @@ -49,6 +50,9 @@ Exigences * 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/ (optionnel) * SDL_Mixer: http://www.libsdl.org/projects/SDL_mixer/ (optionnel) diff --git a/docs/fr_FR.UTF-8/html/EXTENDING.html b/docs/fr_FR.UTF-8/html/EXTENDING.html index 5a08a324f..64cbb6085 100644 --- a/docs/fr_FR.UTF-8/html/EXTENDING.html +++ b/docs/fr_FR.UTF-8/html/EXTENDING.html @@ -26,7 +26,7 @@

    - mai 31, 2021

    + septembre 6, 2021


    - Pinceaux animés orientables

    + Rotating Brushes

    - Vous pouvez mélanger animation et orientation dans un même pinceau. Utilisez les deux options ("frames=N" et "directional") en deux lignes séparées dans le fichier ".dat" qui concerne le pinceau.

    + 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.

    - Disposez le pinceau de manière à ce que chaque ensemble 3x3 de formes orientables soit disposé sur une grande image PNG. Par exemple, si le pinceau mesure 30x30 et qu'il y a 5 cadres, ce sera 450x90. (Les 150x90 pixels les plus à gauche de l'image représentent les 9 formes de direction pour la première image, par exemple).

    + Ajoute une ligne contenant le mot "rotate" au fichier de données brosse.

    +
    + +

    + 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/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 @@
  • 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/ (optionnel)
  • SDL_Mixer: http://www.libsdl.org/projects/SDL_mixer/ (optionnel)
  • diff --git a/docs/gl_ES.UTF-8/EXTENDING.txt b/docs/gl_ES.UTF-8/EXTENDING.txt index ecfd8fbb1..6ccb974c6 100644 --- a/docs/gl_ES.UTF-8/EXTENDING.txt +++ b/docs/gl_ES.UTF-8/EXTENDING.txt @@ -5,7 +5,7 @@ Copyright © 2002-2021 por varios colaboradores; vexa AUTHORS (AUTORES). http://www.tuxpaint.org/ - 31 de Maio de 2021 + 6 de Setembro de 2021 ---------------------------------------------------------------------- @@ -221,17 +221,27 @@ Pinceis Engada unha liña que conteña a palabra «directional» ao ficheiro de datos debrush's. - Pinceis direccionais animados + Rotating Brushes - Pode mesturar funcións animadas e direccionais nun pincel. Use ambas - as opcións («frames=N» e «directional»), en liñas separadas no - ficheiro «.dat» do pincel. + 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. - Coloque o pincel de xeito que cada conxunto de formas 3x3 de - dirección estea distribuído nunha ampla imaxe PNG. Por exemplo, se o - pincel ten 30x30 e hai 5 fotogramas, sería de 450x90. (Os píxeles - máis a esquerda de 150x90 da imaxe representan as 9 formas de - dirección do primeiro cadro, por exemplo). + Engada unha liña que conteña a palabra «rotate» ao ficheiro de datos + debrush's. + + 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.) Coloque os ficheiros PNG de pincel (e calquera ficheiro de texto de datos) no directorio «brushes». diff --git a/docs/gl_ES.UTF-8/INSTALL.txt b/docs/gl_ES.UTF-8/INSTALL.txt index 51f54ba18..a02cb5dda 100644 --- a/docs/gl_ES.UTF-8/INSTALL.txt +++ b/docs/gl_ES.UTF-8/INSTALL.txt @@ -36,10 +36,11 @@ Requirements 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: @@ -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/ (opcional) * SDL_Mixer: http://www.libsdl.org/projects/SDL_mixer/ (opcional) diff --git a/docs/gl_ES.UTF-8/html/EXTENDING.html b/docs/gl_ES.UTF-8/html/EXTENDING.html index fe15c606c..2fd21e8c3 100644 --- a/docs/gl_ES.UTF-8/html/EXTENDING.html +++ b/docs/gl_ES.UTF-8/html/EXTENDING.html @@ -26,7 +26,7 @@

    - 31 de Maio de 2021

    + 6 de Setembro de 2021


    - Pinceis direccionais animados

    + Rotating Brushes

    - Pode mesturar funcións animadas e direccionais nun pincel. Use ambas as opcións («frames=N» e «directional»), en liñas separadas no ficheiro «.dat» do pincel.

    + 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.

    - Coloque o pincel de xeito que cada conxunto de formas 3x3 de dirección estea distribuído nunha ampla imaxe PNG. Por exemplo, se o pincel ten 30x30 e hai 5 fotogramas, sería de 450x90. (Os píxeles máis a esquerda de 150x90 da imaxe representan as 9 formas de dirección do primeiro cadro, por exemplo).

    + Engada unha liña que conteña a palabra «rotate» ao ficheiro de datos debrush's.

    +
    + +

    + 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/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 @@
  • 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/ (opcional)
  • SDL_Mixer: http://www.libsdl.org/projects/SDL_mixer/ (opcional)
  • diff --git a/docs/ja_JP.UTF-8/EXTENDING.txt b/docs/ja_JP.UTF-8/EXTENDING.txt index 1f4cccb04..42ef4b29e 100644 --- a/docs/ja_JP.UTF-8/EXTENDING.txt +++ b/docs/ja_JP.UTF-8/EXTENDING.txt @@ -5,7 +5,7 @@ Copyright © 2002-2021 by various contributors; "AUTHORS" 参照. http://www.tuxpaint.org/ - 2021年5月31日 + 2021年9月 6日 ---------------------------------------------------------------------- @@ -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/ja_JP.UTF-8/INSTALL.txt b/docs/ja_JP.UTF-8/INSTALL.txt index 4b82c98e0..845b4dded 100644 --- a/docs/ja_JP.UTF-8/INSTALL.txt +++ b/docs/ja_JP.UTF-8/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/ja_JP.UTF-8/html/EXTENDING.html b/docs/ja_JP.UTF-8/html/EXTENDING.html index f459a29f1..17cbfd7e2 100644 --- a/docs/ja_JP.UTF-8/html/EXTENDING.html +++ b/docs/ja_JP.UTF-8/html/EXTENDING.html @@ -26,7 +26,7 @@

    - 2021年5月31日

    + 2021年9月 6日


    - 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/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 @@
  • 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/src/tuxpaint.c b/src/tuxpaint.c index 4ef6d5f9d..e45977c7d 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -402,6 +402,15 @@ static void mtw(wchar_t * wtok, char *tok) #error "---------------------------------------------------" #endif +#include "SDL_rotozoom.h" +#if !defined(_SDL_rotozoom_h) +#error "---------------------------------------------------" +#error "If you installed SDL_gfx from a package, be sure" +#error "to get the development package, as well!" +#error "(e.g., 'libsdl-gfx1.2-devel.rpm')" +#error "---------------------------------------------------" +#endif + #ifndef NO_SDLPANGO @@ -1810,6 +1819,7 @@ static SDL_Surface **img_brushes, **img_brushes_thumbs; static int *brushes_frames = NULL; static int *brushes_spacing = NULL; static short *brushes_directional = NULL; +static short *brushes_rotate = NULL; static SDL_Surface *img_shapes[NUM_SHAPES], *img_shape_names[NUM_SHAPES]; static SDL_Surface *img_fills[NUM_FILLS], *img_fill_names[NUM_FILLS]; @@ -1845,7 +1855,8 @@ enum static SDL_Surface *img_cur_brush; static int img_cur_brush_frame_w, img_cur_brush_w, img_cur_brush_h, - img_cur_brush_frames, img_cur_brush_directional, img_cur_brush_spacing; + img_cur_brush_frames, img_cur_brush_directional, img_cur_brush_rotate, + img_cur_brush_spacing; static int brush_counter, brush_frame; #define NUM_ERASERS 16 /* How many sizes of erasers @@ -1925,7 +1936,7 @@ SDL_Joystick *joystick; static void mainloop(void); static void brush_draw(int x1, int y1, int x2, int y2, int update); -static void blit_brush(int x, int y, int direction); +static void blit_brush(int x, int y, int direction, int rotation, int * w, int * h); static void stamp_draw(int x, int y); static void rec_undo_buffer(void); @@ -5845,14 +5856,23 @@ static void brush_draw(int x1, int y1, int x2, int y2, int update) direction = BRUSH_DIRECTION_NONE; - if (brushes_directional[cur_brush]) + r = 0; + if (brushes_directional[cur_brush] || brushes_rotate[cur_brush]) { - r = brush_rotation(x1, y1, x2, y2) + 22; - if (r < 0) - r = r + 360; + r = brush_rotation(x1, y1, x2, y2); - if (x1 != x2 || y1 != y2) - direction = (r / 45); + if (brushes_directional[cur_brush]) + { + r = r + 22; + if (r < 0) + r = r + 360; + if (x1 != x2 || y1 != y2) + direction = (r / 45); + } + else + { + r = 270 - r; + } } @@ -5878,12 +5898,12 @@ static void brush_draw(int x1, int y1, int x2, int y2, int update) if (y1 > y2) { for (y = y1; y >= y2; y--) - blit_brush(x1, y, direction); + blit_brush(x1, y, direction, r, &w, &h); } else { for (y = y1; y <= y2; y++) - blit_brush(x1, y, direction); + blit_brush(x1, y, direction, r, &w, &h); } x1 = x1 + dx; @@ -5899,7 +5919,7 @@ static void brush_draw(int x1, int y1, int x2, int y2, int update) } for (y = y1; y <= y2; y++) - blit_brush(x1, y, direction); + blit_brush(x1, y, direction, r, &w, &h); } if (orig_x1 > orig_x2) @@ -5944,9 +5964,10 @@ void reset_brush_counter(void) * * @param x X coordinate * @param y Y coordinate - * @param direction BRUSH_DIRECTION_... being drawn + * @param direction BRUSH_DIRECTION_... being drawn (for compass direction brushes) + * @param rotation angle being drawn (for brushes which may rotate at any angle (0-360 degrees)) */ -static void blit_brush(int x, int y, int direction) +static void blit_brush(int x, int y, int direction, int rotation, int * w, int * h) { SDL_Rect src, dest; @@ -6019,8 +6040,38 @@ static void blit_brush(int x, int y, int direction) src.w = img_cur_brush_w; src.h = img_cur_brush_h; - SDL_BlitSurface(img_cur_brush, &src, canvas, &dest); + if (img_cur_brush_rotate) + { + SDL_Surface * rotated_brush; + + /* TODO: Cache these; discard them when the user changes the brush or alters its color */ + /* FIXME: Account for src being within an animated brush! */ + rotated_brush = rotozoomSurface(img_cur_brush, rotation, 1.0, SMOOTHING_ON); + if (rotated_brush != NULL) + { + src.x = 0; + src.y = 0; + src.w = rotated_brush->w; + src.h = rotated_brush->h; + + dest.x = dest.x - (img_cur_brush_w >> 1) + (rotated_brush->w >> 1); + dest.y = dest.y - (img_cur_brush_h >> 1) + (rotated_brush->h >> 1); + dest.w = rotated_brush->w; + dest.h = rotated_brush->h; + + SDL_BlitSurface(rotated_brush, &src, canvas, &dest); + + SDL_FreeSurface(rotated_brush); + } + } + else + { + SDL_BlitSurface(img_cur_brush, &src, canvas, &dest); + } } + + *w = src.w; + *h = src.h; } @@ -6899,6 +6950,7 @@ static void loadbrush_callback(SDL_Surface * screen, img_brushes_thumbs = realloc(img_brushes_thumbs, num_brushes_max * sizeof *img_brushes_thumbs); brushes_frames = realloc(brushes_frames, num_brushes_max * sizeof(int)); brushes_directional = realloc(brushes_directional, num_brushes_max * sizeof(short)); + brushes_rotate = realloc(brushes_rotate, num_brushes_max * sizeof(short)); brushes_spacing = realloc(brushes_spacing, num_brushes_max * sizeof(int)); } img_brushes[num_brushes] = loadimage(fname); @@ -6907,6 +6959,7 @@ static void loadbrush_callback(SDL_Surface * screen, brushes_frames[num_brushes] = 1; brushes_directional[num_brushes] = 0; + brushes_rotate[num_brushes] = 0; brushes_spacing[num_brushes] = img_brushes[num_brushes]->h / 4; strcpy(strcasestr(fname, ".png"), ".dat"); /* FIXME: Use strncpy (ugh, complicated) */ @@ -6932,6 +6985,10 @@ static void loadbrush_callback(SDL_Surface * screen, { brushes_directional[num_brushes] = 1; } + else if (strstr(buf, "rotate") != NULL) + { + brushes_rotate[num_brushes] = 1; + } else if (strstr(buf, "random") != NULL) { want_rand = 1; @@ -8842,7 +8899,7 @@ static void draw_brushes(void) SDL_BlitSurface(img_brushes_thumbs[brush], &src, screen, &dest); - if (brushes_directional[brush]) + if (brushes_directional[brush] || brushes_rotate[brush]) { dest.x = ui_btn_x + button_w - img_brush_dir->w; dest.y = ui_btn_y + button_h - img_brush_dir->h; @@ -10458,6 +10515,7 @@ static void render_brush(void) img_cur_brush_h = img_cur_brush->h / (brushes_directional[cur_brush] ? 3 : 1); img_cur_brush_frames = brushes_frames[cur_brush]; img_cur_brush_directional = brushes_directional[cur_brush]; + img_cur_brush_rotate = brushes_rotate[cur_brush]; img_cur_brush_spacing = brushes_spacing[cur_brush]; brush_counter = 0; @@ -13073,6 +13131,7 @@ static void cleanup(void) free_surface_array(img_brushes_thumbs, num_brushes); free(brushes_frames); free(brushes_directional); + free(brushes_rotate); free(brushes_spacing); free_surface_array(img_tools, NUM_TOOLS); free_surface_array(img_tool_names, NUM_TOOLS);