Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
LivarotDefs.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-or-later
/*
5
* Authors:
6
* see git history
7
* Fred
8
*
9
* Copyright (C) 2018 Authors
10
* Released under GNU GPL v2+, read the file
'COPYING'
for
more information.
11
*/
12
13
#ifndef my_defs
14
#define my_defs
15
16
#include <cstdint>
17
18
// error codes (mostly obsolete)
19
enum
20
{
21
avl_no_err
= 0,
// 0 is the error code for "everything OK"
22
avl_bal_err
= 1,
23
avl_rm_err
= 2,
24
avl_ins_err
= 3,
25
shape_euler_err
= 4,
// computations result in a non-eulerian graph, thus the function cannot do a proper polygon
26
// despite the rounding sheme, this still happen with uber-complex graphs
27
// note that coordinates are stored in double => double precision for the computation is not even
28
// enough to get exact results (need quadruple precision, i think).
29
shape_input_err
= 5,
// the function was given an incorrect input (not a polygon, or not eulerian)
30
shape_nothing_to_do
= 6
// the function had nothing to do (zero offset, etc)
31
};
32
33
// return codes for the find function in the AVL tree (private)
34
40
enum
41
{
42
not_found
= 0,
43
found_exact
= 1,
44
found_on_left
= 2,
45
found_on_right
= 3,
46
found_between
= 4
47
};
48
49
// types of cap for stroking polylines
50
enum
ButtType
51
{
52
butt_straight
,
// straight line
53
butt_square
,
// half square
54
butt_round
,
// half circle
55
butt_pointy
// a little pointy hat
56
};
57
58
// types of joins for stroking paths
59
enum
JoinType
60
{
61
join_straight
,
// a straight line
62
join_round
,
// arc of circle (in fact, one or two quadratic bezier curve chunks)
63
join_pointy
// a miter join (uses the miter parameter)
64
};
65
66
enum
FillRule
67
{
68
fill_oddEven
= 0,
69
fill_nonZero
= 1,
70
fill_positive
= 2,
71
fill_justDont
= 3
72
};
73
74
// boolean operation
75
enum
BooleanOp
76
{
77
bool_op_union
,
// A OR B
78
bool_op_inters
,
// A AND B
79
bool_op_diff
,
// A \ B
80
bool_op_symdiff
,
// A XOR B
81
bool_op_cut
,
// coupure (pleines)
82
bool_op_slice
// coupure (contour)
83
};
84
85
enum
Side
{
86
LEFT
= 0,
87
RIGHT
= 1
88
};
89
90
enum
FirstOrLast
{
91
FIRST
= 0,
92
LAST
= 1
93
};
94
95
#endif
found_on_left
@ found_on_left
Definition
LivarotDefs.h:44
found_on_right
@ found_on_right
Definition
LivarotDefs.h:45
not_found
@ not_found
Definition
LivarotDefs.h:42
found_between
@ found_between
Definition
LivarotDefs.h:46
found_exact
@ found_exact
Definition
LivarotDefs.h:43
ButtType
ButtType
Definition
LivarotDefs.h:51
butt_pointy
@ butt_pointy
Definition
LivarotDefs.h:55
butt_round
@ butt_round
Definition
LivarotDefs.h:54
butt_straight
@ butt_straight
Definition
LivarotDefs.h:52
butt_square
@ butt_square
Definition
LivarotDefs.h:53
Side
Side
Definition
LivarotDefs.h:85
LEFT
@ LEFT
Definition
LivarotDefs.h:86
RIGHT
@ RIGHT
Definition
LivarotDefs.h:87
FillRule
FillRule
Definition
LivarotDefs.h:67
fill_oddEven
@ fill_oddEven
Definition
LivarotDefs.h:68
fill_nonZero
@ fill_nonZero
Definition
LivarotDefs.h:69
fill_justDont
@ fill_justDont
Definition
LivarotDefs.h:71
fill_positive
@ fill_positive
Definition
LivarotDefs.h:70
BooleanOp
BooleanOp
Definition
LivarotDefs.h:76
bool_op_symdiff
@ bool_op_symdiff
Definition
LivarotDefs.h:80
bool_op_diff
@ bool_op_diff
Definition
LivarotDefs.h:79
bool_op_cut
@ bool_op_cut
Definition
LivarotDefs.h:81
bool_op_inters
@ bool_op_inters
Definition
LivarotDefs.h:78
bool_op_union
@ bool_op_union
Definition
LivarotDefs.h:77
bool_op_slice
@ bool_op_slice
Definition
LivarotDefs.h:82
avl_rm_err
@ avl_rm_err
Definition
LivarotDefs.h:23
shape_input_err
@ shape_input_err
Definition
LivarotDefs.h:29
avl_ins_err
@ avl_ins_err
Definition
LivarotDefs.h:24
avl_bal_err
@ avl_bal_err
Definition
LivarotDefs.h:22
shape_euler_err
@ shape_euler_err
Definition
LivarotDefs.h:25
shape_nothing_to_do
@ shape_nothing_to_do
Definition
LivarotDefs.h:30
avl_no_err
@ avl_no_err
Definition
LivarotDefs.h:21
FirstOrLast
FirstOrLast
Definition
LivarotDefs.h:90
FIRST
@ FIRST
Definition
LivarotDefs.h:91
LAST
@ LAST
Definition
LivarotDefs.h:92
JoinType
JoinType
Definition
LivarotDefs.h:60
join_round
@ join_round
Definition
LivarotDefs.h:62
join_pointy
@ join_pointy
Definition
LivarotDefs.h:63
join_straight
@ join_straight
Definition
LivarotDefs.h:61
src
livarot
LivarotDefs.h
Generated on Sun May 18 2025 04:02:18 for Inkscape by
1.9.8