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
"
17
#include "
display/control/canvas-item-ptr.h
"
18
19
#define TC_MIN_PRESSURE 0.0
20
#define TC_MAX_PRESSURE 1.0
21
#define TC_DEFAULT_PRESSURE 0.35
22
23
namespace
Inkscape
{
class
CanvasItemBpath; }
24
25
namespace
Inkscape::UI::Tools
{
26
27
enum
{
28
TWEAK_MODE_MOVE
,
29
TWEAK_MODE_MOVE_IN_OUT
,
30
TWEAK_MODE_MOVE_JITTER
,
31
TWEAK_MODE_SCALE
,
32
TWEAK_MODE_ROTATE
,
33
TWEAK_MODE_MORELESS
,
34
TWEAK_MODE_PUSH
,
35
TWEAK_MODE_SHRINK_GROW
,
36
TWEAK_MODE_ATTRACT_REPEL
,
37
TWEAK_MODE_ROUGHEN
,
38
TWEAK_MODE_COLORPAINT
,
39
TWEAK_MODE_COLORJITTER
,
40
TWEAK_MODE_BLUR
41
};
42
43
class
TweakTool
:
public
ToolBase
44
{
45
public
:
46
TweakTool
(
SPDesktop
*
desktop
);
47
~TweakTool
()
override
;
48
49
/* extended input data */
50
double
pressure
;
51
52
/* attributes */
53
bool
usepressure
;
54
bool
usetilt
;
55
56
double
width
;
57
double
force
;
58
double
fidelity
;
59
60
int
mode
;
61
62
bool
is_drawing
;
63
64
bool
is_dilating
;
65
bool
has_dilated
;
66
Geom::Point
last_push
;
67
CanvasItemPtr<CanvasItemBpath>
dilate_area
;
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
80
private
:
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 :
set
bool set
Definition
actions-canvas-snapping.cpp:86
canvas-item-ptr.h
CanvasItemPtr
std::unique_ptr< T, CanvasItemUnlinkDeleter > CanvasItemPtr
Smart pointer used to hold CanvasItems, like std::unique_ptr.
Definition
canvas-item-ptr.h:27
Geom::Point
Two-dimensional point that doubles as a vector.
Definition
point.h:66
Inkscape::Preferences::Entry
Data type representing a typeless value of a preference.
Definition
preferences.h:152
Inkscape::UI::Tools::ToolBase
Base class for Event processors.
Definition
tool-base.h:95
Inkscape::UI::Tools::TweakTool
Definition
tweak-tool.h:44
Inkscape::UI::Tools::TweakTool::do_l
bool do_l
Definition
tweak-tool.h:71
Inkscape::UI::Tools::TweakTool::style_set_connection
sigc::scoped_connection style_set_connection
Definition
tweak-tool.h:74
Inkscape::UI::Tools::TweakTool::width
double width
Definition
tweak-tool.h:56
Inkscape::UI::Tools::TweakTool::pressure
double pressure
Definition
tweak-tool.h:50
Inkscape::UI::Tools::TweakTool::usepressure
bool usepressure
Definition
tweak-tool.h:53
Inkscape::UI::Tools::TweakTool::usetilt
bool usetilt
Definition
tweak-tool.h:54
Inkscape::UI::Tools::TweakTool::set_style
bool set_style(SPCSSAttr const *css)
Definition
tweak-tool.cpp:215
Inkscape::UI::Tools::TweakTool::dilate_area
CanvasItemPtr< CanvasItemBpath > dilate_area
Definition
tweak-tool.h:67
Inkscape::UI::Tools::TweakTool::has_dilated
bool has_dilated
Definition
tweak-tool.h:65
Inkscape::UI::Tools::TweakTool::is_dilating
bool is_dilating
Definition
tweak-tool.h:64
Inkscape::UI::Tools::TweakTool::do_h
bool do_h
Definition
tweak-tool.h:69
Inkscape::UI::Tools::TweakTool::last_push
Geom::Point last_push
Definition
tweak-tool.h:66
Inkscape::UI::Tools::TweakTool::~TweakTool
~TweakTool() override
Definition
tweak-tool.cpp:103
Inkscape::UI::Tools::TweakTool::mode
int mode
Definition
tweak-tool.h:60
Inkscape::UI::Tools::TweakTool::fidelity
double fidelity
Definition
tweak-tool.h:58
Inkscape::UI::Tools::TweakTool::update_cursor
void update_cursor(bool with_shift)
Definition
tweak-tool.cpp:123
Inkscape::UI::Tools::TweakTool::root_handler
bool root_handler(CanvasEvent const &event) override
Definition
tweak-tool.cpp:1023
Inkscape::UI::Tools::TweakTool::force
double force
Definition
tweak-tool.h:57
Inkscape::UI::Tools::TweakTool::is_drawing
bool is_drawing
Definition
tweak-tool.h:62
Inkscape::UI::Tools::TweakTool::do_o
bool do_o
Definition
tweak-tool.h:72
Inkscape::UI::Tools::TweakTool::do_s
bool do_s
Definition
tweak-tool.h:70
SPCSSAttr
Definition
sp-css-attr.h:18
SPDesktop
To do: update description of desktop.
Definition
desktop.h:149
css
std::shared_ptr< Css const > css
Definition
ctrl-handle-manager.cpp:26
Inkscape::UI::Tools
Definition
desktop.h:121
Inkscape::UI::Tools::TWEAK_MODE_MORELESS
@ TWEAK_MODE_MORELESS
Definition
tweak-tool.h:33
Inkscape::UI::Tools::TWEAK_MODE_COLORJITTER
@ TWEAK_MODE_COLORJITTER
Definition
tweak-tool.h:39
Inkscape::UI::Tools::TWEAK_MODE_MOVE
@ TWEAK_MODE_MOVE
Definition
tweak-tool.h:28
Inkscape::UI::Tools::TWEAK_MODE_MOVE_JITTER
@ TWEAK_MODE_MOVE_JITTER
Definition
tweak-tool.h:30
Inkscape::UI::Tools::TWEAK_MODE_COLORPAINT
@ TWEAK_MODE_COLORPAINT
Definition
tweak-tool.h:38
Inkscape::UI::Tools::TWEAK_MODE_ROUGHEN
@ TWEAK_MODE_ROUGHEN
Definition
tweak-tool.h:37
Inkscape::UI::Tools::TWEAK_MODE_SHRINK_GROW
@ TWEAK_MODE_SHRINK_GROW
Definition
tweak-tool.h:35
Inkscape::UI::Tools::TWEAK_MODE_SCALE
@ TWEAK_MODE_SCALE
Definition
tweak-tool.h:31
Inkscape::UI::Tools::TWEAK_MODE_MOVE_IN_OUT
@ TWEAK_MODE_MOVE_IN_OUT
Definition
tweak-tool.h:29
Inkscape::UI::Tools::TWEAK_MODE_BLUR
@ TWEAK_MODE_BLUR
Definition
tweak-tool.h:40
Inkscape::UI::Tools::TWEAK_MODE_PUSH
@ TWEAK_MODE_PUSH
Definition
tweak-tool.h:34
Inkscape::UI::Tools::TWEAK_MODE_ATTRACT_REPEL
@ TWEAK_MODE_ATTRACT_REPEL
Definition
tweak-tool.h:36
Inkscape::UI::Tools::TWEAK_MODE_ROTATE
@ TWEAK_MODE_ROTATE
Definition
tweak-tool.h:32
Inkscape
Helper class to stream background task notifications as a series of messages.
Definition
actions-canvas-snapping.h:27
Inkscape::CanvasEvent
Abstract base class for events.
Definition
canvas-event.h:64
desktop
SPDesktop * desktop
Definition
tabs-widget.cpp:70
tool-base.h
src
ui
tools
tweak-tool.h
Generated on Sun Jul 13 2025 04:02:22 for Inkscape by
1.9.8