Code

eaf2425994ea6142ad0b5baf64cad2dc11bd6539
[inkscape.git] / src / splivarot.h
1 #ifndef __SP_LIVAROT_H__
2 #define __SP_LIVAROT_H__
4 /*
5  * boolops and outlines
6  *
7  * public domain
8  */
10 #include "livarot/Path.h"
11 #include <2geom/forward.h>
12 #include <2geom/path.h>
13 class SPCurve;
14 struct SPItem;
16 // boolean operations
17 // work on the current selection
18 // selection has 2 contain exactly 2 items
19 void sp_selected_path_union ();
20 void sp_selected_path_union_skip_undo ();
21 void sp_selected_path_intersect ();
22 void sp_selected_path_diff ();
23 void sp_selected_path_diff_skip_undo ();
24 void sp_selected_path_symdiff ();
25 void sp_selected_path_cut ();
26 void sp_selected_path_slice ();
28 // offset/inset of a curve
29 // takes the fill-rule in consideration
30 // offset amount is the stroke-width of the curve
31 void sp_selected_path_offset ();
32 void sp_selected_path_offset_screen (double pixels);
33 void sp_selected_path_inset ();
34 void sp_selected_path_inset_screen (double pixels);
35 void sp_selected_path_create_offset ();
36 void sp_selected_path_create_inset ();
37 void sp_selected_path_create_updating_offset ();
38 void sp_selected_path_create_updating_inset ();
40 void sp_selected_path_create_offset_object_zero ();
41 void sp_selected_path_create_updating_offset_object_zero ();
43 // outline of a curve
44 // uses the stroke-width
45 void sp_selected_path_outline ();
47 // simplifies a path (removes small segments and the like)
48 void sp_selected_path_simplify ();
50 Path *Path_for_item(SPItem *item, bool doTransformation, bool transformFull = true);
51 NArtBpath *bpath_for_curve(SPItem *item, SPCurve *curve, bool doTransformation, bool transformFull, NR::Matrix extraPreAffine, NR::Matrix extraPostAffine);
52 Geom::PathVector pathvector_for_curve(SPItem *item, SPCurve *curve, bool doTransformation, bool transformFull);
53 SPCurve *curve_for_item(SPItem *item);
54 NR::Maybe<Path::cut_position> get_nearest_position_on_Path(Path *path, NR::Point p, unsigned seg = 0);
55 NR::Point get_point_on_Path(Path *path, int piece, double t);
56 Path *bpath_to_Path(NArtBpath const *bpath);
58 #endif
60 /*
61   Local Variables:
62   mode:c++
63   c-file-style:"stroustrup"
64   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
65   indent-tabs-mode:nil
66   fill-column:99
67   End:
68 */
69 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :