summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-05-26 04:46:58 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-05-26 04:46:58 +0000
commitc07932d0152ddb5b592f4ba164ee6efe03f821a3 (patch)
tree01ed754957dce05cf6c0ef3fa60bb14b1ab066a1 /src
parent* src/path-prefix.h: Add missing CREATE_* directory locations (diff)
downloadinkscape-c07932d0152ddb5b592f4ba164ee6efe03f821a3.tar.gz
inkscape-c07932d0152ddb5b592f4ba164ee6efe03f821a3.zip
export markers API
(bzr r1012)
Diffstat (limited to 'src')
-rw-r--r--src/sp-shape.cpp10
-rw-r--r--src/sp-shape.h11
2 files changed, 11 insertions, 10 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index 172339095..304d481bd 100644
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
@@ -53,8 +53,6 @@ static void sp_shape_hide (SPItem *item, unsigned int key);
static void sp_shape_snappoints (SPItem const *item, SnapPointsIter p);
static void sp_shape_update_marker_view (SPShape *shape, NRArenaItem *ai);
-static int sp_shape_has_markers (SPShape const *shape);
-static int sp_shape_number_of_markers (SPShape* Shape, int type);
static SPItemClass *parent_class;
@@ -233,7 +231,7 @@ sp_shape_update (SPObject *object, SPCtx *ctx, unsigned int flags)
* \param bp Path segment.
* \return 1 if a marker is required here, otherwise 0.
*/
-static bool
+bool
sp_shape_marker_required(SPShape const *shape, int const m, NArtBpath *bp)
{
if (shape->marker[m] == NULL) {
@@ -435,7 +433,7 @@ found:
* \return Transform matrix.
*/
-static NR::Matrix
+NR::Matrix
sp_shape_marker_get_transform(SPShape const *shape, NArtBpath const *bp)
{
g_return_val_if_fail(( is_moveto(SP_CURVE_BPATH(shape->curve)[0].code)
@@ -721,7 +719,7 @@ sp_shape_hide (SPItem *item, unsigned int key)
* \param shape Shape.
* \return TRUE if the shape has any markers, or FALSE if not.
*/
-static int
+int
sp_shape_has_markers (SPShape const *shape)
{
/* Note, we're ignoring 'marker' settings, which technically should apply for
@@ -742,7 +740,7 @@ sp_shape_has_markers (SPShape const *shape)
* \param type Marker type (e.g. SP_MARKER_LOC_START)
* \return Number of markers that the shape has of this type.
*/
-static int
+int
sp_shape_number_of_markers (SPShape *shape, int type)
{
int n = 0;
diff --git a/src/sp-shape.h b/src/sp-shape.h
index 547928436..32774f603 100644
--- a/src/sp-shape.h
+++ b/src/sp-shape.h
@@ -49,14 +49,17 @@ 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);
+NR::Matrix sp_shape_marker_get_transform(SPShape const *shape, NArtBpath const *bp);
+bool sp_shape_marker_required(SPShape const *shape, int const m, NArtBpath *bp);
#endif