Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
lpe-roughen.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/* Authors:
6 * Jabier Arraiza Cenoz <jabier.arraiza@marker.es>
7 *
8 * Copyright (C) 2014 Authors
9 *
10 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
11 */
12
13#ifndef INKSCAPE_LPE_ROUGHEN_H
14#define INKSCAPE_LPE_ROUGHEN_H
15
16#include "live_effects/effect.h"
22
23#include <memory>
24
25namespace Inkscape {
26namespace LivePathEffect {
27
33
41
42class LPERoughen : public Effect {
43
44public:
46 ~LPERoughen() override;
47
48 void doOnApply(SPLPEItem const *lpeitem) override;
49 void doEffect(Geom::PathVector &curve) override;
50 virtual double sign(double randNumber);
51 virtual Geom::Point randomize(double max_length, bool is_node = false);
52 void doBeforeEffect(SPLPEItem const * lpeitem) override;
53 virtual Geom::Point tPoint(Geom::Point A, Geom::Point B, double t = 0.5);
54 Gtk::Widget *newWidget() override;
55
56private:
58 double t, bool last);
59 Geom::Path jitter(Geom::Curve const &A, Geom::Point &prev, Geom::Point &last_move);
60
71 long seed;
72 LPERoughen(const LPERoughen &) = delete;
73 LPERoughen &operator=(const LPERoughen &) = delete;
74};
75
76} //namespace LivePathEffect
77} //namespace Inkscape
78
79#endif
Abstract continuous curve on a plane defined on [0,1].
Definition curve.h:78
Sequence of subpaths.
Definition pathvector.h:122
Sequence of contiguous curves, aka spline.
Definition path.h:353
Two-dimensional point that doubles as a vector.
Definition point.h:66
LPERoughen & operator=(const LPERoughen &)=delete
virtual Geom::Point tPoint(Geom::Point A, Geom::Point B, double t=0.5)
Gtk::Widget * newWidget() override
This creates a managed widget.
LPERoughen(const LPERoughen &)=delete
Geom::Path addNodesAndJitter(Geom::Curve const &A, Geom::Point &prev, Geom::Point &last_move, double t, bool last)
virtual double sign(double randNumber)
void doEffect(Geom::PathVector &curve) override
EnumParam< DivisionMethod > method
Definition lpe-roughen.h:61
Geom::Path jitter(Geom::Curve const &A, Geom::Point &prev, Geom::Point &last_move)
void doBeforeEffect(SPLPEItem const *lpeitem) override
Is performed each time before the effect is updated.
virtual Geom::Point randomize(double max_length, bool is_node=false)
EnumParam< HandlesMethod > handles
Definition lpe-roughen.h:67
void doOnApply(SPLPEItem const *lpeitem) override
Is performed a single time when the effect is freshly applied to a path.
Helper class to stream background task notifications as a series of messages.
Definition curve.h:24