~ubuntu-branches/ubuntu/oneiric/inkscape/oneiric-updates

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/sp-shape.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SP_SHAPE_H__
 
2
#define __SP_SHAPE_H__
 
3
 
 
4
/*
 
5
 * Base class for shapes, including <path> element
 
6
 *
 
7
 * Author:
 
8
 *   Lauris Kaplinski <lauris@kaplinski.com>
 
9
 *
 
10
 * Copyright (C) 1999-2002 Lauris Kaplinski
 
11
 * Copyright (C) 2000-2001 Ximian, Inc.
 
12
 * Copyright (C) 2008 Johan Engelen
 
13
 *
 
14
 * Released under GNU GPL, read the file 'COPYING' for more information
 
15
 */
 
16
 
 
17
#include "display/display-forward.h"
 
18
#include "sp-lpe-item.h"
 
19
#include "sp-marker-loc.h"
 
20
#include <2geom/forward.h>
 
21
 
 
22
#include <sigc++/connection.h>
 
23
 
 
24
#define SP_TYPE_SHAPE (sp_shape_get_type ())
 
25
#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape))
 
26
#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass))
 
27
#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE))
 
28
#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE))
 
29
 
 
30
#define SP_SHAPE_WRITE_PATH (1 << 2)
 
31
 
 
32
struct SPDesktop;
 
33
 
 
34
struct SPShape : public SPLPEItem {
 
35
    SPCurve *curve;
 
36
 
 
37
      SPObject *marker[SP_MARKER_LOC_QTY];
 
38
      sigc::connection release_connect [SP_MARKER_LOC_QTY];
 
39
      sigc::connection modified_connect [SP_MARKER_LOC_QTY];
 
40
};
 
41
 
 
42
struct SPShapeClass {
 
43
        SPLPEItemClass item_class;
 
44
 
 
45
        /* Build bpath from extra shape attributes */
 
46
        void (* set_shape) (SPShape *shape);
 
47
};
 
48
 
 
49
GType sp_shape_get_type (void);
 
50
 
 
51
void sp_shape_set_shape (SPShape *shape);
 
52
 
 
53
/* Return duplicate of curve or NULL */
 
54
SPCurve *sp_shape_get_curve (SPShape *shape);
 
55
 
 
56
// sets a curve, updates display
 
57
void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner);
 
58
 
 
59
// same as sp_shape_set_curve, but without updating display
 
60
void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner);
 
61
 
 
62
// markers API
 
63
void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value);
 
64
int sp_shape_has_markers (SPShape const *shape);
 
65
int sp_shape_number_of_markers (SPShape* Shape, int type);
 
66
 
 
67
Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2);
 
68
Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c);
 
69
Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c);
 
70
 
 
71
#endif