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-fillet-chamfer.h | 88 +++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 src/live_effects/lpe-fillet-chamfer.h (limited to 'src/live_effects/lpe-fillet-chamfer.h') diff --git a/src/live_effects/lpe-fillet-chamfer.h b/src/live_effects/lpe-fillet-chamfer.h new file mode 100644 index 0000000..603b3aa --- /dev/null +++ b/src/live_effects/lpe-fillet-chamfer.h @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef INKSCAPE_LPE_FILLET_CHAMFER_H +#define INKSCAPE_LPE_FILLET_CHAMFER_H + +/* + * Author(s): + * Jabiertxo Arraiza Cenoz + * + * Copyright (C) 2014 Author(s) + * + * Jabiertxof:Thanks to all people help me + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ + +#include "helper/geom-nodesatellite.h" +#include "helper/geom-pathvector_nodesatellites.h" +#include "live_effects/effect.h" +#include "live_effects/parameter/enum.h" +#include "live_effects/parameter/hidden.h" +#include "live_effects/parameter/nodesatellitesarray.h" +#include "live_effects/parameter/unit.h" + +namespace Inkscape { +namespace LivePathEffect { + +enum Filletmethod { + FM_AUTO, + FM_ARC, + FM_BEZIER, + FM_END +}; + +class LPEFilletChamfer : public Effect { +public: + LPEFilletChamfer(LivePathEffectObject *lpeobject); + void doBeforeEffect(SPLPEItem const *lpeItem) override; + Geom::PathVector doEffect_path(Geom::PathVector const &path_in) override; + void doOnApply(SPLPEItem const *lpeItem) override; + Gtk::Widget *newWidget() override; + Geom::Ray getRay(Geom::Point start, Geom::Point end, Geom::Curve *curve, bool reverse); + void addChamferSteps(Geom::Path &tmp_path, Geom::Path path_chamfer, Geom::Point end_arc_point, size_t steps); + void addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector &hp_vec) override; + void updateNodeSatelliteType(NodeSatelliteType nodesatellitetype); + void setSelected(PathVectorNodeSatellites *_pathvector_nodesatellites); + //void convertUnit(); + void updateChamferSteps(); + void updateAmount(); + void refreshKnots(); + bool helperpath; + NodeSatelliteArrayParam nodesatellites_param; + +private: + UnitParam unit; + EnumParam method; + ScalarParam radius; + ScalarParam chamfer_steps; + BoolParam flexible; + HiddenParam mode; + BoolParam only_selected; + BoolParam use_knot_distance; + BoolParam hide_knots; + BoolParam apply_no_radius; + BoolParam apply_with_radius; + bool _degenerate_hide; + PathVectorNodeSatellites *_pathvector_nodesatellites; + Geom::PathVector _hp; + Glib::ustring previous_unit; + LPEFilletChamfer(const LPEFilletChamfer &); + LPEFilletChamfer &operator=(const LPEFilletChamfer &); + +}; + +} //namespace LivePathEffect +} //namespace Inkscape + +#endif + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : -- cgit v1.2.3