Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
lpe-taperstroke.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/* Authors:
6 * Liam P White <inkscapebrony@gmail.com>
7 * Copyright (C) 2014 Authors
8 *
9 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
10 */
11
12#ifndef INKSCAPE_LPE_TAPERSTROKE_H
13#define INKSCAPE_LPE_TAPERSTROKE_H
14
15#include "live_effects/effect.h"
20
21namespace Inkscape {
22namespace LivePathEffect {
23
24namespace TpS {
25// we need a separate namespace to avoid clashes with other LPEs
26class KnotHolderEntityAttachBegin;
27class KnotHolderEntityAttachEnd;
28}
29
30class LPETaperStroke : public Effect {
31public:
33 ~LPETaperStroke() override;
34
35 void doOnApply(SPLPEItem const* lpeitem) override;
36 void doOnRemove(SPLPEItem const* lpeitem) override;
37 void doBeforeEffect (SPLPEItem const* lpeitem) override;
38 Geom::PathVector doEffect_path (Geom::PathVector const& path_in) override;
39 Geom::PathVector doEffect_simplePath(Geom::Path const& path, size_t index, double start, double end);
40 void transform_multiply(Geom::Affine const &postmul, bool set) override;
41
42 void addKnotHolderEntities(KnotHolder * knotholder, SPItem * item) override;
43protected:
50private:
57 size_t previous_size = 1;
58 std::vector<Geom::Point> start_attach_point;
59 std::vector<Geom::Point> end_attach_point;
60 size_t prev_subpath = Glib::ustring::npos;
64};
65
66} //namespace LivePathEffect
67} //namespace Inkscape
68
69#endif
70
71/*
72 Local Variables:
73 mode:c++
74 c-file-style:"stroustrup"
75 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
76 indent-tabs-mode:nil
77 fill-column:99
78 End:
79*/
80// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 :
3x3 matrix representing an affine transformation.
Definition affine.h:70
Sequence of subpaths.
Definition pathvector.h:122
Sequence of contiguous curves, aka spline.
Definition path.h:353
LPETaperStroke(const LPETaperStroke &)=delete
LPETaperStroke & operator=(const LPETaperStroke &)=delete
void doBeforeEffect(SPLPEItem const *lpeitem) override
Is performed each time before the effect is updated.
Geom::PathVector doEffect_simplePath(Geom::Path const &path, size_t index, double start, double end)
void transform_multiply(Geom::Affine const &postmul, bool set) override
Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
void doOnApply(SPLPEItem const *lpeitem) override
Is performed a single time when the effect is freshly applied to a path.
void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) override
std::vector< Geom::Point > end_attach_point
Geom::PathVector doEffect_path(Geom::PathVector const &path_in) override
std::vector< Geom::Point > start_attach_point
void doOnRemove(SPLPEItem const *lpeitem) override
Base class for visual SVG elements.
Definition sp-item.h:109
SPItem * item
Geom::Point start
Geom::Point end
Helper class to stream background task notifications as a series of messages.
int index