X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsp-shape.h;h=4b1ded23649394f2066412c1d4be334d62b72817;hb=530f7fc7cfa4351ec33163abd795460bbc351609;hp=5479284365f3d03131b2e3ad1ed84d249f62d573;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/sp-shape.h b/src/sp-shape.h index 547928436..4b1ded236 100644 --- a/src/sp-shape.h +++ b/src/sp-shape.h @@ -9,15 +9,17 @@ * * Copyright (C) 1999-2002 Lauris Kaplinski * Copyright (C) 2000-2001 Ximian, Inc. + * Copyright (C) 2008 Johan Engelen * * Released under GNU GPL, read the file 'COPYING' for more information */ #include "display/display-forward.h" -#include "sp-item.h" +#include "sp-lpe-item.h" #include "sp-marker-loc.h" +#include <2geom/forward.h> - +#include #define SP_TYPE_SHAPE (sp_shape_get_type ()) #define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape)) @@ -27,16 +29,18 @@ #define SP_SHAPE_WRITE_PATH (1 << 2) -struct SPShape : public SPItem { - SPCurve *curve; +struct SPDesktop; + +struct SPShape : public SPLPEItem { + SPCurve *curve; SPObject *marker[SP_MARKER_LOC_QTY]; - gulong release_connect [SP_MARKER_LOC_QTY]; - gulong modified_connect [SP_MARKER_LOC_QTY]; + sigc::connection release_connect [SP_MARKER_LOC_QTY]; + sigc::connection modified_connect [SP_MARKER_LOC_QTY]; }; struct SPShapeClass { - SPItemClass item_class; + SPLPEItemClass item_class; /* Build bpath from extra shape attributes */ void (* set_shape) (SPShape *shape); @@ -49,14 +53,19 @@ void sp_shape_set_shape (SPShape *shape); /* Return duplicate of curve or NULL */ SPCurve *sp_shape_get_curve (SPShape *shape); +// sets a curve, updates display void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner); -/* NOT FOR GENERAL PUBLIC UNTIL SORTED OUT (Lauris) */ +// same as sp_shape_set_curve, but without updating display void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner); -/* PROTECTED */ +// markers API void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value); +int sp_shape_has_markers (SPShape const *shape); +int sp_shape_number_of_markers (SPShape* Shape, int type); - +Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2); +Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c); +Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c); #endif