1 /* 2 fill.h 3 4 Fill tool 5 Tux Paint - A simple drawing program for children. 6 7 Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt 8 bill@newbreedsoftware.com 9 http://www.tuxpaint.org/ 10 11 Flood fill code based on Wikipedia example: 12 http://www.wikipedia.org/wiki/Flood_fill/C_example 13 by Damian Yerrick - http://www.wikipedia.org/wiki/Damian_Yerrick 14 15 This program is free software; you can redistribute it and/or modify 16 it under the terms of the GNU General Public License as published by 17 the Free Software Foundation; either version 2 of the License, or 18 (at your option) any later version. 19 20 This program is distributed in the hope that it will be useful, 21 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 GNU General Public License for more details. 24 25 You should have received a copy of the GNU General Public License 26 along with this program; if not, write to the Free Software 27 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28 (See COPYING.txt) 29 30 Last updated: March 8, 2021 31 $Id$ 32 */ 33 34 #ifndef FILL_H 35 #define FILL_H 36 37 #include "SDL.h" 38 39 int would_flood_fill(SDL_Surface * canvas, Uint32 cur_colr, Uint32 old_colr); 40 void do_flood_fill(SDL_Surface * screen, SDL_Surface * last, SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr, int * x1, int * y1, int * x2, int * y2, Uint8 * touched); 41 void simulate_flood_fill(SDL_Surface * screen, SDL_Surface * last, SDL_Surface * canvas, int x, int y, Uint32 cur_colr, Uint32 old_colr, int * x1, int * y1, int * x2, int * y2, Uint8 * touched); 42 void draw_linear_gradient(SDL_Surface * canvas, SDL_Surface * last, 43 int x_left, int y_top, int x_right, int y_bottom, 44 int x1, int y1, int x2, int y2, Uint32 draw_color, Uint8 * touched); 45 void draw_radial_gradient(SDL_Surface * canvas, int x_left, int y_top, int x_right, int y_bottom, 46 int x, int y, Uint32 draw_color, Uint8 * touched); 47 48 #endif 49 50