diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/sp-shape.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/sp-shape.h')
| -rw-r--r-- | src/sp-shape.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/sp-shape.h b/src/sp-shape.h new file mode 100644 index 000000000..547928436 --- /dev/null +++ b/src/sp-shape.h @@ -0,0 +1,62 @@ +#ifndef __SP_SHAPE_H__ +#define __SP_SHAPE_H__ + +/* + * Base class for shapes, including <path> element + * + * Author: + * Lauris Kaplinski <lauris@kaplinski.com> + * + * Copyright (C) 1999-2002 Lauris Kaplinski + * Copyright (C) 2000-2001 Ximian, Inc. + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "display/display-forward.h" +#include "sp-item.h" +#include "sp-marker-loc.h" + + + +#define SP_TYPE_SHAPE (sp_shape_get_type ()) +#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape)) +#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass)) +#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE)) +#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE)) + +#define SP_SHAPE_WRITE_PATH (1 << 2) + +struct SPShape : public SPItem { + SPCurve *curve; + + SPObject *marker[SP_MARKER_LOC_QTY]; + gulong release_connect [SP_MARKER_LOC_QTY]; + gulong modified_connect [SP_MARKER_LOC_QTY]; +}; + +struct SPShapeClass { + SPItemClass item_class; + + /* Build bpath from extra shape attributes */ + void (* set_shape) (SPShape *shape); +}; + +GType sp_shape_get_type (void); + +void sp_shape_set_shape (SPShape *shape); + +/* Return duplicate of curve or NULL */ +SPCurve *sp_shape_get_curve (SPShape *shape); + +void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner); + +/* NOT FOR GENERAL PUBLIC UNTIL SORTED OUT (Lauris) */ +void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner); + +/* PROTECTED */ +void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value); + + + +#endif |
