gimp/app/pathsP.h
GMT 1999 Andy Thomas 4adf289ed6 Changed:- Makefile.am internal_procs.c pathsP.h paths_dialog.c
Mon Mar 22 00:38:20 GMT 1999 Andy Thomas <alt@gimp.org>

	Changed:-
	* Makefile.am
	* internal_procs.c
	* pathsP.h
	* paths_dialog.c
	* paths_dialog.h
	* xcf.c

	New:-
	* paths_cmds.c
	* paths_cmds.h

	PDB functions for paths. (More to follow).
	Functions are:-
		gimp_path_list
		gimp_path_get_points
		gimp_path_get_current
		gimp_path_set_current
		gimp_path_set_points
		gimp_path_stroke_current
1999-03-22 00:51:30 +00:00

69 lines
2.4 KiB
C

/* The GIMP -- an image manipulation program
* Copyright (C) 1999 Andy Thomas alt@picnic.demon.co.uk
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PATHSP_H__
#define __PATHSP_H__
/* Cutdown representation of the bezier curve description */
/* Will be used to hopefully store in XCF format...
*/
typedef struct {
guint32 type;
gdouble x;
gdouble y;
} PATHPOINT, *PATHPOINTP;
typedef struct {
GSList * path_details;
guint32 pathtype; /* Only beziers to start with */
gboolean closed;
guint32 state;
guint32 locked; /* Only bottom bit used */
GString * name;
} PATH, *PATHP;
typedef struct {
GimpImage * gimage;
GDisplay * gdisp; /* This is a hack.. Needed so we can get back to
* the same display that these curves were added
* too. That way when an entry in the paths dialog
* is clicked the bezier tool can be targeted at
* correct display. Note this display could have been
* deleted (ie different view), but gdisplays_check_valid()
* function will take care of that.. In this case we just
* pick a display that the gimage is rendered in.
*/
GSList * bz_paths; /* list of BZPATHP */
guint sig_id;
gint32 last_selected_row;
} PATHIMAGELIST, *PATHIMAGELISTP, PathsList;
typedef enum {
BEZIER = 1,
} PathType;
PATHPOINTP pathpoint_new(gint,gdouble,gdouble);
PATHP path_new(PathType,GSList *,gint,gint,gint,gchar *);
PathsList * pathsList_new(GimpImage *,gint,GSList *);
gboolean paths_set_path(GimpImage *,gchar *);
gboolean paths_set_path_points(GimpImage *,gchar *,gint,gint,gint,gdouble *);
void paths_stroke(GimpImage *,PathsList *,PATHP);
#endif /* __PATHSP_H__ */