summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/node-types.h
blob: bad6a5c52c6443faf8bdf95d3e45d29897378d37 (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
// SPDX-License-Identifier: GPL-2.0-or-later
/** @file
 * Node types and other small enums.
 * This file exists to reduce the number of includes pulled in by toolbox.cpp.
 */
/* Authors:
 *   Krzysztof Kosiński <tweenk.pl@gmail.com>
 *
 * Copyright (C) 2009 Authors
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */

#ifndef SEEN_UI_TOOL_NODE_TYPES_H
#define SEEN_UI_TOOL_NODE_TYPES_H

namespace Inkscape {
namespace UI {

/** Types of nodes supported in the node tool. */
enum NodeType {
    NODE_CUSP, ///< Cusp node - no handle constraints
    NODE_SMOOTH, ///< Smooth node - handles must be colinear
    NODE_AUTO, ///< Auto node - handles adjusted automatically based on neighboring nodes
    NODE_SYMMETRIC, ///< Symmetric node - handles must be colinear and of equal length
    NODE_LAST_REAL_TYPE, ///< Last real type of node - used for ctrl+click on a node
    NODE_PICK_BEST = 100 ///< Select type based on handle positions
};

/** Types of segments supported in the node tool. */
enum SegmentType {
    SEGMENT_STRAIGHT, ///< Straight linear segment
    SEGMENT_CUBIC_BEZIER ///< Bezier curve with two control points
};

enum class AlignTargetNode {
    LAST_NODE,
    FIRST_NODE,
    MID_NODE,
    MIN_NODE,
    MAX_NODE
};

} // namespace UI
} // 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:fileencoding=utf-8:textwidth=99 :