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)
19enum
20{
21 avl_no_err = 0, // 0 is the error code for "everything OK"
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
40enum
41{
46 found_between = 4
47};
48
49// types of cap for stroking polylines
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
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
73
74// boolean operation
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
85enum Side {
86 LEFT = 0,
87 RIGHT = 1
88};
89
91 FIRST = 0,
92 LAST = 1
93};
94
95#endif
@ found_on_left
Definition LivarotDefs.h:44
@ found_on_right
Definition LivarotDefs.h:45
@ not_found
Definition LivarotDefs.h:42
@ found_between
Definition LivarotDefs.h:46
@ found_exact
Definition LivarotDefs.h:43
ButtType
Definition LivarotDefs.h:51
@ butt_pointy
Definition LivarotDefs.h:55
@ butt_round
Definition LivarotDefs.h:54
@ butt_straight
Definition LivarotDefs.h:52
@ butt_square
Definition LivarotDefs.h:53
Side
Definition LivarotDefs.h:85
@ LEFT
Definition LivarotDefs.h:86
@ RIGHT
Definition LivarotDefs.h:87
FillRule
Definition LivarotDefs.h:67
@ fill_oddEven
Definition LivarotDefs.h:68
@ fill_nonZero
Definition LivarotDefs.h:69
@ fill_justDont
Definition LivarotDefs.h:71
@ fill_positive
Definition LivarotDefs.h:70
BooleanOp
Definition LivarotDefs.h:76
@ bool_op_symdiff
Definition LivarotDefs.h:80
@ bool_op_diff
Definition LivarotDefs.h:79
@ bool_op_cut
Definition LivarotDefs.h:81
@ bool_op_inters
Definition LivarotDefs.h:78
@ bool_op_union
Definition LivarotDefs.h:77
@ bool_op_slice
Definition LivarotDefs.h:82
@ avl_rm_err
Definition LivarotDefs.h:23
@ shape_input_err
Definition LivarotDefs.h:29
@ avl_ins_err
Definition LivarotDefs.h:24
@ avl_bal_err
Definition LivarotDefs.h:22
@ shape_euler_err
Definition LivarotDefs.h:25
@ shape_nothing_to_do
Definition LivarotDefs.h:30
@ avl_no_err
Definition LivarotDefs.h:21
FirstOrLast
Definition LivarotDefs.h:90
@ FIRST
Definition LivarotDefs.h:91
@ LAST
Definition LivarotDefs.h:92
JoinType
Definition LivarotDefs.h:60
@ join_round
Definition LivarotDefs.h:62
@ join_pointy
Definition LivarotDefs.h:63
@ join_straight
Definition LivarotDefs.h:61