Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
tweak-tool.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef INKSCAPE_UI_TOOLS_TWEAK_TOOl_H
3#define INKSCAPE_UI_TOOLS_TWEAK_TOOl_H
4
5/*
6 * tweaking paths without node editing
7 *
8 * Authors:
9 * bulia byak
10 *
11 * Copyright (C) 2007 authors
12 *
13 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
14 */
15
16#include "ui/tools/tool-base.h"
18
19#define TC_MIN_PRESSURE 0.0
20#define TC_MAX_PRESSURE 1.0
21#define TC_DEFAULT_PRESSURE 0.35
22
23namespace Inkscape { class CanvasItemBpath; }
24
25namespace Inkscape::UI::Tools {
26
27enum {
41};
42
43class TweakTool : public ToolBase
44{
45public:
47 ~TweakTool() override;
48
49 /* extended input data */
50 double pressure;
51
52 /* attributes */
54 bool usetilt;
55
56 double width;
57 double force;
58 double fidelity;
59
60 int mode;
61
63
68
69 bool do_h;
70 bool do_s;
71 bool do_l;
72 bool do_o;
73
74 sigc::scoped_connection style_set_connection;
75
76 void set(Preferences::Entry const &val) override;
77 bool root_handler(CanvasEvent const &event) override;
78 void update_cursor(bool with_shift);
79
80private:
81 bool set_style(SPCSSAttr const *css);
82};
83
84} // namespace Inkscape::UI::Tool
85
86#endif // INKSCAPE_UI_TOOLS_TWEAK_TOOl_H
87
88/*
89 Local Variables:
90 mode:c++
91 c-file-style:"stroustrup"
92 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
93 indent-tabs-mode:nil
94 fill-column:99
95 End:
96*/
97// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
std::unique_ptr< T, CanvasItemUnlinkDeleter > CanvasItemPtr
Smart pointer used to hold CanvasItems, like std::unique_ptr.
Two-dimensional point that doubles as a vector.
Definition point.h:66
Data type representing a typeless value of a preference.
Base class for Event processors.
Definition tool-base.h:95
sigc::scoped_connection style_set_connection
Definition tweak-tool.h:74
bool set_style(SPCSSAttr const *css)
CanvasItemPtr< CanvasItemBpath > dilate_area
Definition tweak-tool.h:67
void update_cursor(bool with_shift)
bool root_handler(CanvasEvent const &event) override
To do: update description of desktop.
Definition desktop.h:149
std::shared_ptr< Css const > css
Helper class to stream background task notifications as a series of messages.
Abstract base class for events.
SPDesktop * desktop