1 #ifndef INKSCAPE_LPE_LINE_SEGMENT_H
2 #define INKSCAPE_LPE_LINE_SEGMENT_H
4 /** \file
5 * LPE <line_segment> implementation
6 */
8 /*
9 * Authors:
10 * Maximilian Albert
11 *
12 * Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
13 *
14 * Released under GNU GPL, read the file 'COPYING' for more information
15 */
17 #include "live_effects/effect.h"
18 #include "live_effects/parameter/enum.h"
20 namespace Inkscape {
21 namespace LivePathEffect {
23 enum EndType {
24 END_CLOSED,
25 END_OPEN_INITIAL,
26 END_OPEN_FINAL,
27 END_OPEN_BOTH
28 };
30 class LPELineSegment : public Effect {
31 public:
32 LPELineSegment(LivePathEffectObject *lpeobject);
33 virtual ~LPELineSegment();
35 virtual void doBeforeEffect (SPLPEItem *lpeitem);
37 virtual std::vector<Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
39 //private:
40 EnumParam<EndType> end_type;
42 private:
43 Geom::Point A, B; // intersections of the line segment with the limiting bounding box
44 Geom::Point bboxA, bboxB; // upper left and lower right corner of limiting bounding box
46 LPELineSegment(const LPELineSegment&);
47 LPELineSegment& operator=(const LPELineSegment&);
48 };
50 } //namespace LivePathEffect
51 } //namespace Inkscape
53 #endif
55 /*
56 Local Variables:
57 mode:c++
58 c-file-style:"stroustrup"
59 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
60 indent-tabs-mode:nil
61 fill-column:99
62 End:
63 */
64 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :