From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- src/live_effects/lpe-lattice2.h | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 src/live_effects/lpe-lattice2.h (limited to 'src/live_effects/lpe-lattice2.h') diff --git a/src/live_effects/lpe-lattice2.h b/src/live_effects/lpe-lattice2.h new file mode 100644 index 0000000..319a0dc --- /dev/null +++ b/src/live_effects/lpe-lattice2.h @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef INKSCAPE_LPE_LATTICE2_H +#define INKSCAPE_LPE_LATTICE2_H + +/** \file + * LPE implementation, see lpe-lattice2.cpp. + */ + +/* + * Authors: + * Johan Engelen + * Steren Giannini + * NoĆ© Falzon + * Victor Navez + * ~suv + * Jabiertxo Arraiza + * + * Copyright (C) Johan Engelen 2007 + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include "live_effects/effect.h" +#include "live_effects/parameter/enum.h" +#include "live_effects/parameter/point.h" +#include "live_effects/lpegroupbbox.h" + +namespace Gtk { +class Expander; +} + +namespace Inkscape { +namespace LivePathEffect { + +class LPELattice2 : public Effect, GroupBBoxEffect { +public: + + LPELattice2(LivePathEffectObject *lpeobject); + ~LPELattice2() override; + + Geom::Piecewise > doEffect_pwd2 (Geom::Piecewise > const & pwd2_in) override; + + void resetDefaults(SPItem const* item) override; + + void doBeforeEffect(SPLPEItem const* lpeitem) override; + + Gtk::Widget * newWidget() override; + + void calculateCurve(Geom::Point a,Geom::Point b, SPCurve *c, bool horizontal, bool move); + + void vertical(PointParam ¶mA,PointParam ¶mB, Geom::Line vert); + + void horizontal(PointParam ¶mA,PointParam ¶mB,Geom::Line horiz); + + void setDefaults(); + + void onExpanderChanged(); + + void resetGrid(); + +protected: + void addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector &hp_vec) override; +private: + + BoolParam horizontal_mirror; + BoolParam vertical_mirror; + BoolParam perimetral; + BoolParam live_update; + PointParam grid_point_0; + PointParam grid_point_1; + PointParam grid_point_2; + PointParam grid_point_3; + PointParam grid_point_4; + PointParam grid_point_5; + PointParam grid_point_6; + PointParam grid_point_7; + PointParam grid_point_8x9; + PointParam grid_point_10x11; + PointParam grid_point_12; + PointParam grid_point_13; + PointParam grid_point_14; + PointParam grid_point_15; + PointParam grid_point_16; + PointParam grid_point_17; + PointParam grid_point_18; + PointParam grid_point_19; + PointParam grid_point_20x21; + PointParam grid_point_22x23; + PointParam grid_point_24x26; + PointParam grid_point_25x27; + PointParam grid_point_28x30; + PointParam grid_point_29x31; + PointParam grid_point_32x33x34x35; + + bool expanded; + Gtk::Expander * expander; + + LPELattice2(const LPELattice2&) = delete; + LPELattice2& operator=(const LPELattice2&) = delete; +}; + +} //namespace LivePathEffect +} //namespace Inkscape + +#endif -- cgit v1.2.3