1 // SPDX-License-Identifier: GPL-2.0-or-later 2 #ifndef SEEN_SP_PATH_H 3 #define SEEN_SP_PATH_H 4 5 /* 6 * SVG <path> implementation 7 * 8 * Authors: 9 * Lauris Kaplinski <lauris@kaplinski.com> 10 * Ximian, Inc. 11 * Johan Engelen 12 * 13 * Copyright (C) 1999-2002 Lauris Kaplinski 14 * Copyright (C) 2000-2001 Ximian, Inc. 15 * Copyright (C) 1999-2012 Authors 16 * 17 * Released under GNU GPL v2+, read the file 'COPYING' for more information. 18 */ 19 20 #include "sp-shape.h" 21 #include "sp-conn-end-pair.h" 22 #include "style-internal.h" // For SPStyleSrc 23 24 class SPCurve; 25 26 #define SP_PATH(obj) (dynamic_cast<SPPath*>((SPObject*)obj)) 27 #define SP_IS_PATH(obj) (dynamic_cast<const SPPath*>((SPObject*)obj) != NULL) 28 29 /** 30 * SVG <path> implementation 31 */ 32 class SPPath : public SPShape { 33 public: 34 SPPath(); 35 ~SPPath() override; 36 37 int nodesInPath() const; 38 friend class SPConnEndPair; 39 SPConnEndPair connEndPair; 40 41 void build(SPDocument *document, Inkscape::XML::Node *repr) override; 42 void release() override; 43 void update(SPCtx* ctx, unsigned int flags) override; 44 45 void set(SPAttr key, char const* value) override; 46 void update_patheffect(bool write) override; 47 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override; 48 49 const char* displayName() const override; 50 char* description() const override; 51 Geom::Affine set_transform(Geom::Affine const &transform) override; 52 void convert_to_guides() const override; 53 private: 54 SPStyleSrc d_source; // Source of 'd' value, saved for output. 55 }; 56 57 #endif // SEEN_SP_PATH_H 58 59 /* 60 Local Variables: 61 mode:c++ 62 c-file-style:"stroustrup" 63 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) 64 indent-tabs-mode:nil 65 fill-column:99 66 End: 67 */ 68 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : 69