1 /* Generic bezier shape item for GnomeCanvas
2  *
3  * GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget.  Tk is
4  * copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
5  *
6  * Copyright (C) 1998,1999 The Free Software Foundation
7  *
8  * Authors: Federico Mena <federico@nuclecu.unam.mx>
9  *          Raph Levien <raph@acm.org>
10  *          Lauris Kaplinski <lauris@ximian.com>
11  *          Rusty Conover <rconover@bangtail.net>
12  */
13 
14 #ifndef GNOME_CANVAS_SHAPE_H
15 #define GNOME_CANVAS_SHAPE_H
16 
17 #include <libgnomecanvas/gnome-canvas.h>
18 #include <libgnomecanvas/gnome-canvas-path-def.h>
19 
20 G_BEGIN_DECLS
21 
22 
23 /* Shape item for the canvas.
24  *
25  * The following object arguments are available:
26  *
27  * name			type			read/write	description
28  * ------------------------------------------------------------------------------------------
29  * fill_color		string			W		X color specification for fill color,
30  *								or NULL pointer for no color (transparent).
31  * fill_color_gdk	GdkColor*		RW		Allocated GdkColor for fill.
32  * outline_color	string			W		X color specification for outline color,
33  *								or NULL pointer for no color (transparent).
34  * outline_color_gdk	GdkColor*		RW		Allocated GdkColor for outline.
35  * fill_stipple		GdkBitmap*		RW		Stipple pattern for fill
36  * outline_stipple	GdkBitmap*		RW		Stipple pattern for outline
37  * width_pixels		uint			RW		Width of the outline in pixels.  The outline will
38  *								not be scaled when the canvas zoom factor is changed.
39  * width_units		double			RW		Width of the outline in canvas units.  The outline
40  *								will be scaled when the canvas zoom factor is changed.
41  * cap_style		GdkCapStyle		RW		Cap ("endpoint") style for the bpath.
42  * join_style		GdkJoinStyle		RW		Join ("vertex") style for the bpath.
43  * wind                 ArtWindRule             RW              Winding rule for the bpath.
44  * dash			ArtVpathDash		RW		Dashing pattern
45  * miterlimit		double			RW		Minimum angle between segments, where miter join
46  *								rule is applied.
47  */
48 
49 #define GNOME_TYPE_CANVAS_SHAPE            (gnome_canvas_shape_get_type ())
50 #define GNOME_CANVAS_SHAPE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_SHAPE, GnomeCanvasShape))
51 #define GNOME_CANVAS_SHAPE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_SHAPE, GnomeCanvasShapeClass))
52 #define GNOME_IS_CANVAS_SHAPE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_SHAPE))
53 #define GNOME_IS_CANVAS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_SHAPE))
54 
55 
56 typedef struct _GnomeCanvasShape GnomeCanvasShape;
57 typedef struct _GnomeCanvasShapePriv GnomeCanvasShapePriv;
58 typedef struct _GnomeCanvasShapeClass GnomeCanvasShapeClass;
59 
60 struct _GnomeCanvasShape {
61 	GnomeCanvasItem item;
62 
63 	GnomeCanvasShapePriv *priv;	/* Private data */
64 };
65 
66 struct _GnomeCanvasShapeClass {
67 	GnomeCanvasItemClass parent_class;
68 };
69 
70 
71 /* WARNING! These are not usable from modifying shapes from user programs */
72 /* These are meant, to set master shape from subclass ::update method */
73 void gnome_canvas_shape_set_path_def (GnomeCanvasShape *shape, GnomeCanvasPathDef *def);
74 GnomeCanvasPathDef *gnome_canvas_shape_get_path_def (GnomeCanvasShape *shape);
75 
76 /* Standard Gtk function */
77 GType gnome_canvas_shape_get_type (void) G_GNUC_CONST;
78 
79 G_END_DECLS
80 
81 #endif
82