3
* SVG <hatchPath> implementation
7
* Tomasz Boczkowski <penginsbacon@gmail.com>
8
* Jon A. Cruz <jon@joncruz.org>
10
* Copyright (C) 2014 Tomasz Boczkowski
12
* Released under GNU GPL, read the file 'COPYING' for more information
15
#ifndef SEEN_SP_HATCH_PATH_H
16
#define SEEN_SP_HATCH_PATH_H
20
#include <glibmm/ustring.h>
21
#include <sigc++/connection.h>
23
#include "svg/svg-length.h"
32
class SPHatchPath : public SPObject {
35
virtual ~SPHatchPath();
39
void setCurve(SPCurve *curve, bool owner);
43
Inkscape::DrawingItem *show(Inkscape::Drawing &drawing, unsigned int key, Geom::OptInterval extents);
44
void hide(unsigned int key);
46
void setStripExtents(unsigned int key, Geom::OptInterval const &extents);
47
Geom::Interval bounds() const;
49
SPCurve *calculateRenderCurve(unsigned key) const;
52
virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
53
virtual void release();
54
virtual void set(unsigned int key, const gchar* value);
55
virtual void update(SPCtx* ctx, unsigned int flags);
60
View(Inkscape::DrawingShape *arenaitem, int key);
61
//Do not delete arenaitem in destructor.
65
Inkscape::DrawingShape *arenaitem;
66
Geom::OptInterval extents;
70
typedef std::list<SPHatchPath::View>::iterator ViewIterator;
71
typedef std::list<SPHatchPath::View>::const_iterator ConstViewIterator;
72
std::list<View> _display;
74
gdouble _repeatLength() const;
75
void _updateView(View &view);
76
SPCurve *_calculateRenderCurve(View const &view) const;
78
void _readHatchPathVector(char const *str, Geom::PathVector &pathv, bool &continous_join);
84
#endif // SEEN_SP_HATCH_PATH_H
89
c-file-style:"stroustrup"
90
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
95
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :