plug-ins/flame/libifs.[ch] plug-ins/flame/rect.c

2006-11-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/flame/libifs.[ch]
	* plug-ins/flame/rect.c
	* plug-ins/maze/algorithms.c
	* plug-ins/maze/handy.c
	* plug-ins/maze/maze.h
	* plug-ins/sel2path/fit.c
	* plug-ins/sel2path/pxl-outline.h: fixed prototypes.
This commit is contained in:
Sven Neumann
2006-11-24 11:10:10 +00:00
committed by Sven Neumann
parent 67556fd196
commit 7dd45bc30a
9 changed files with 71 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2006-11-24 Sven Neumann <sven@gimp.org>
* plug-ins/flame/libifs.[ch]
* plug-ins/flame/rect.c
* plug-ins/maze/algorithms.c
* plug-ins/maze/handy.c
* plug-ins/maze/maze.h
* plug-ins/sel2path/fit.c
* plug-ins/sel2path/pxl-outline.h: fixed prototypes.
2006-11-24 Manish Singh <yosh@gimp.org> 2006-11-24 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/pygimp-vectors.c: bezier_stroke_new_moveto and * plug-ins/pygimp/pygimp-vectors.c: bezier_stroke_new_moveto and

View File

@ -873,17 +873,17 @@ void print_control_point(f, cp, quote)
} }
/* returns a uniform variable from 0 to 1 */ /* returns a uniform variable from 0 to 1 */
double random_uniform01() { double random_uniform01(void) {
return g_random_double (); return g_random_double ();
} }
double random_uniform11() { double random_uniform11(void) {
return g_random_double_range (-1, 1); return g_random_double_range (-1, 1);
} }
/* returns a mean 0 variance 1 random variable /* returns a mean 0 variance 1 random variable
see numerical recipies p 217 */ see numerical recipies p 217 */
double random_gaussian() { double random_gaussian(void) {
static int iset = 0; static int iset = 0;
static double gset; static double gset;
double fac, r, v1, v2; double fac, r, v1, v2;

View File

@ -81,9 +81,9 @@ extern void parse_control_point(char **ss, control_point *cp);
extern void estimate_bounding_box(control_point *cp, double eps, double *bmin, double *bmax); extern void estimate_bounding_box(control_point *cp, double eps, double *bmin, double *bmax);
extern void sort_control_points(control_point *cps, int ncps, double (*metric)()); extern void sort_control_points(control_point *cps, int ncps, double (*metric)());
extern double standard_metric(control_point *cp1, control_point *cp2); extern double standard_metric(control_point *cp1, control_point *cp2);
extern double random_uniform01(); extern double random_uniform01(void);
extern double random_uniform11(); extern double random_uniform11(void);
extern double random_gaussian(); extern double random_gaussian(void);
extern void mult_matrix(double s1[2][2], double s2[2][2], double d[2][2]); extern void mult_matrix(double s1[2][2], double s2[2][2], double d[2][2]);
void copy_variation(control_point *cp0, control_point *cp1); void copy_variation(control_point *cp0, control_point *cp1);
#endif #endif

View File

@ -68,7 +68,7 @@ typedef accum_t abucket[4];
} }
/* sum of entries of vector to 1 */ /* sum of entries of vector to 1 */
void normalize_vector(v, n) static void normalize_vector(v, n)
double *v; double *v;
int n; int n;
{ {

View File

@ -37,16 +37,18 @@
* *
*/ */
#ifndef SOLO_COMPILE
#include "config.h" #include "config.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include "maze.h"
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "libgimp/gimpui.h" #include "libgimp/gimpui.h"
#include "libgimp/stdplugins-intl.h" #include "libgimp/stdplugins-intl.h"
#include "maze.h"
extern MazeValues mvals; extern MazeValues mvals;
extern GRand *gr; extern GRand *gr;

View File

@ -29,6 +29,9 @@
#include "libgimp/gimp.h" #include "libgimp/gimp.h"
#include "maze.h"
/* get_colors Returns the current foreground and background colors in /* get_colors Returns the current foreground and background colors in
nice little arrays. It works nicely for RGB and grayscale images, nice little arrays. It works nicely for RGB and grayscale images,
however handling of indexed images is somewhat broken. Patches however handling of indexed images is somewhat broken. Patches
@ -103,6 +106,15 @@ get_colors (GimpDrawable *drawable,
* We could keep a row of each color on hand so we wouldn't have to * We could keep a row of each color on hand so we wouldn't have to
* re-fill it every time... */ * re-fill it every time... */
#include "config.h"
#include <stdlib.h>
#include "libgimp/gimp.h"
#include "maze.h"
void void
drawbox( GimpPixelRgn *dest_rgn, drawbox( GimpPixelRgn *dest_rgn,
guint x, guint y, guint w, guint h, guint x, guint y, guint w, guint h,

View File

@ -1,3 +1,23 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __MAZE_H__
#define __MAZE_H__
#define MAZE_TITLE N_("Maze") #define MAZE_TITLE N_("Maze")
@ -44,3 +64,17 @@ enum CellTypes {
FRONTIER, FRONTIER,
MASKED MASKED
}; };
void get_colors (GimpDrawable *drawable,
guint8 *fg,
guint8 *bg);
void drawbox (GimpPixelRgn *dest_rgn,
guint x,
guint y,
guint w,
guint h,
guint8 clr[4]);
#endif /* __MAZE_H__ */

View File

@ -147,7 +147,7 @@ typedef struct index_list
static void append_index (index_list_type *, unsigned); static void append_index (index_list_type *, unsigned);
static void free_index_list (index_list_type *); static void free_index_list (index_list_type *);
static index_list_type new_index_list (); static index_list_type new_index_list (void);
static void remove_adjacent_corners (index_list_type *, unsigned); static void remove_adjacent_corners (index_list_type *, unsigned);
static void align (spline_list_type *); static void align (spline_list_type *);

View File

@ -43,9 +43,7 @@ typedef struct
after the last is the first, and the previous coordinate before the after the last is the first, and the previous coordinate before the
first is the last. */ first is the last. */
#define O_NEXT(p_o, n) (((n) + 1) % O_LENGTH (p_o)) #define O_NEXT(p_o, n) (((n) + 1) % O_LENGTH (p_o))
#define O_PREV(p_o, n) ((n) == 0 \ #define O_PREV(p_o, n) ((n) == 0 ? O_LENGTH (p_o) - 1 : (n) - 1)
? O_LENGTH (p_o) - 1 \
: (n) - 1)
/* And the character turns into a list of such lists. */ /* And the character turns into a list of such lists. */
typedef struct typedef struct
@ -62,7 +60,7 @@ typedef struct
/* Find all pixels on the outline in the character C. */ /* Find all pixels on the outline in the character C. */
extern pixel_outline_list_type find_outline_pixels (); extern pixel_outline_list_type find_outline_pixels (void);
/* Free the memory in the list. */ /* Free the memory in the list. */
extern void free_pixel_outline_list (pixel_outline_list_type *); extern void free_pixel_outline_list (pixel_outline_list_type *);