diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2012-01-17 20:25:50 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2012-01-17 20:25:50 +0000 |
| commit | cf7bcd2af286d205a70eb9d1ec5e4b77fb6d2f19 (patch) | |
| tree | fb8985008fda43525f296bc50584d8d4abc3d5dc /src/sp-path.h | |
| parent | change pencil tool dropdown shapes to use powerstroke, instead of pattern alo... (diff) | |
| download | inkscape-cf7bcd2af286d205a70eb9d1ec5e4b77fb6d2f19.tar.gz inkscape-cf7bcd2af286d205a70eb9d1ec5e4b77fb6d2f19.zip | |
turn SPPath into a class, and add some methods...
(bzr r10897)
Diffstat (limited to 'src/sp-path.h')
| -rw-r--r-- | src/sp-path.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/sp-path.h b/src/sp-path.h index 3d66794d1..5dd79212c 100644 --- a/src/sp-path.h +++ b/src/sp-path.h @@ -6,9 +6,12 @@ * * Authors: * Lauris Kaplinski <lauris@kaplinski.com> + * Ximian, Inc. + * Johan Engelen * * Copyright (C) 1999-2002 Lauris Kaplinski * Copyright (C) 2000-2001 Ximian, Inc. + * Copyright (C) 1999-2012 Authors * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -16,13 +19,30 @@ #include "sp-shape.h" #include "sp-conn-end-pair.h" -struct SPCurve; +class SPCurve; #define SP_TYPE_PATH (sp_path_get_type ()) #define SP_PATH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_PATH, SPPath)) #define SP_IS_PATH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_PATH)) -struct SPPath : public SPShape { +/** + * SVG <path> implementation + */ +class SPPath : public SPShape { +public: + gint nodesInPath() const; + + // still in lowercase because the names should be clearer on whether curve, curve->copy or curve-ref is returned. + void set_original_curve (SPCurve *curve, unsigned int owner, bool write); + SPCurve* get_original_curve () const; + SPCurve* get_curve_for_edit () const; + const SPCurve* get_curve_reference() const; + +public: // should be made protected + SPCurve* get_curve(); + friend class SPConnEndPair; + +public: SPConnEndPair connEndPair; }; @@ -31,13 +51,6 @@ struct SPPathClass { }; GType sp_path_get_type (void); -gint sp_nodes_in_path(SPPath *path); - -void sp_path_set_original_curve (SPPath *path, SPCurve *curve, unsigned int owner, bool write); -SPCurve* sp_path_get_original_curve (SPPath *path); -SPCurve* sp_path_get_curve_for_edit (SPPath *path); -const SPCurve* sp_path_get_curve_reference (SPPath *path); -SPCurve* sp_path_get_curve (SPPath *path); // should only be available for friends and not public! #endif // SEEN_SP_PATH_H |
