source: trunk/third/libgnomecanvas/libgnomecanvas/gnome-canvas-path-def.h @ 18323

Revision 18323, 3.6 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18322, which included commits to RCS files with non-trunk default branches.
Line 
1#ifndef GNOME_CANVAS_PATH_DEF_H
2#define GNOME_CANVAS_PATH_DEF_H
3
4/*
5 * GnomeCanvasPathDef
6 *
7 * (C) 1999-2000 Lauris Kaplinski <lauris@ximian.com>
8 * Released under LGPL
9 *
10 * This is mostly like GnomeCanvasBpathDef, but with added functionality:
11 * - can be constructed from scratch, from existing bpath of from static bpath
12 * - Path is always terminated with ART_END
13 * - Has closed flag
14 * - has concat, split and copy methods
15 *
16 */
17
18#include <glib.h>
19#include <libart_lgpl/art_bpath.h>
20
21G_BEGIN_DECLS
22
23typedef struct _GnomeCanvasPathDef GnomeCanvasPathDef;
24
25/* Constructors */
26
27GnomeCanvasPathDef * gnome_canvas_path_def_new (void);
28GnomeCanvasPathDef * gnome_canvas_path_def_new_sized (gint length);
29GnomeCanvasPathDef * gnome_canvas_path_def_new_from_bpath (ArtBpath * bpath);
30GnomeCanvasPathDef * gnome_canvas_path_def_new_from_static_bpath (ArtBpath * bpath);
31GnomeCanvasPathDef * gnome_canvas_path_def_new_from_foreign_bpath (ArtBpath * bpath);
32
33void gnome_canvas_path_def_ref (GnomeCanvasPathDef * path);
34void gnome_canvas_path_def_finish (GnomeCanvasPathDef * path);
35void gnome_canvas_path_def_ensure_space (GnomeCanvasPathDef * path, gint space);
36
37/*
38 * Misc constructors
39 * All these return NEW path, not unrefing old
40 * Also copy and duplicate force bpath to be private (otherwise you
41 * would use ref :)
42 */
43
44void gnome_canvas_path_def_copy (GnomeCanvasPathDef * dst, const GnomeCanvasPathDef * src);
45GnomeCanvasPathDef * gnome_canvas_path_def_duplicate (const GnomeCanvasPathDef * path);
46GnomeCanvasPathDef * gnome_canvas_path_def_concat (const GSList * list);
47GSList * gnome_canvas_path_def_split (const GnomeCanvasPathDef * path);
48GnomeCanvasPathDef * gnome_canvas_path_def_open_parts (const GnomeCanvasPathDef * path);
49GnomeCanvasPathDef * gnome_canvas_path_def_closed_parts (const GnomeCanvasPathDef * path);
50GnomeCanvasPathDef * gnome_canvas_path_def_close_all (const GnomeCanvasPathDef * path);
51
52/* Destructor */
53
54void gnome_canvas_path_def_unref (GnomeCanvasPathDef * path);
55
56/* Methods */
57
58/* Sets GnomeCanvasPathDef to zero length */
59
60void gnome_canvas_path_def_reset (GnomeCanvasPathDef * path);
61
62/* Drawing methods */
63
64void gnome_canvas_path_def_moveto (GnomeCanvasPathDef * path, gdouble x, gdouble y);
65void gnome_canvas_path_def_lineto (GnomeCanvasPathDef * path, gdouble x, gdouble y);
66
67/* Does not create new ArtBpath, but simply changes last lineto position */
68
69void gnome_canvas_path_def_lineto_moving (GnomeCanvasPathDef * path, gdouble x, gdouble y);
70void gnome_canvas_path_def_curveto (GnomeCanvasPathDef * path, gdouble x0, gdouble y0,gdouble x1, gdouble y1, gdouble x2, gdouble y2);
71void gnome_canvas_path_def_closepath (GnomeCanvasPathDef * path);
72
73/* Does not draw new line to startpoint, but moves last lineto */
74
75void gnome_canvas_path_def_closepath_current (GnomeCanvasPathDef * path);
76
77/* Various methods */
78
79ArtBpath * gnome_canvas_path_def_bpath (const GnomeCanvasPathDef * path);
80gint gnome_canvas_path_def_length (const GnomeCanvasPathDef * path);
81gboolean gnome_canvas_path_def_is_empty (const GnomeCanvasPathDef * path);
82gboolean gnome_canvas_path_def_has_currentpoint (const GnomeCanvasPathDef * path);
83void gnome_canvas_path_def_currentpoint (const GnomeCanvasPathDef * path, ArtPoint * p);
84ArtBpath * gnome_canvas_path_def_last_bpath (const GnomeCanvasPathDef * path);
85ArtBpath * gnome_canvas_path_def_first_bpath (const GnomeCanvasPathDef * path);
86gboolean gnome_canvas_path_def_any_open (const GnomeCanvasPathDef * path);
87gboolean gnome_canvas_path_def_all_open (const GnomeCanvasPathDef * path);
88gboolean gnome_canvas_path_def_any_closed (const GnomeCanvasPathDef * path);
89gboolean gnome_canvas_path_def_all_closed (const GnomeCanvasPathDef * path);
90
91G_END_DECLS
92
93#endif
Note: See TracBrowser for help on using the repository browser.