summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-show_handles.h
blob: 865034ebc61c33be019f620ae4875ee97232d83c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef INKSCAPE_LPE_SHOW_HANDLES_H
#define INKSCAPE_LPE_SHOW_HANDLES_H

/*
 * Authors:
 *   Jabier Arraiza Cenoz
 *
 * Copyright (C) Jabier Arraiza Cenoz 2014 <jabier.arraiza@marker.es>
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */
#include "helper/geom-nodetype.h"
#include "live_effects/effect.h"
#include "live_effects/lpegroupbbox.h"
#include "live_effects/parameter/bool.h"

namespace Inkscape {
namespace LivePathEffect {

class LPEShowHandles : public Effect , GroupBBoxEffect {

public:
    LPEShowHandles(LivePathEffectObject *lpeobject);
    ~LPEShowHandles() override = default;

    void doOnApply(SPLPEItem const* lpeitem) override;

    void doBeforeEffect (SPLPEItem const* lpeitem) override;

    virtual void generateHelperPath(Geom::PathVector result);

    virtual void drawNode(Geom::Point p, Geom::NodeType nodetype);

    virtual void drawHandle(Geom::Point p);

    virtual void drawHandleLine(Geom::Point p,Geom::Point p2);

protected:

    Geom::PathVector doEffect_path (Geom::PathVector const & path_in) override;

private:

    BoolParam nodes;
    BoolParam handles;
    BoolParam original_path;
    BoolParam original_d;
    BoolParam show_center_node;
    ScalarParam scale_nodes_and_handles;
    double stroke_width;
    static bool alerts_off;

    Geom::PathVector outline_path;

    LPEShowHandles(const LPEShowHandles &) = delete;
    LPEShowHandles &operator=(const LPEShowHandles &) = delete;

};

}; //namespace LivePathEffect
}; //namespace Inkscape
#endif

// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :