X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsplivarot.h;h=d85ae030acd13398bd40091fb046aaccbf381558;hb=5631ed32020cc6eb670765a4463eb1c66d2b90d6;hp=c0a7fb38b76a7eaaf0a02e949c74a516f7cd8847;hpb=0f5976f2f99301f6f93e9b1a103bfc1a731ebb4e;p=inkscape.git diff --git a/src/splivarot.h b/src/splivarot.h index c0a7fb38b..d85ae030a 100644 --- a/src/splivarot.h +++ b/src/splivarot.h @@ -8,46 +8,51 @@ */ #include "livarot/Path.h" +#include <2geom/forward.h> +#include <2geom/path.h> +class SPCurve; +struct SPItem; // boolean operations // work on the current selection // selection has 2 contain exactly 2 items -void sp_selected_path_union (); -void sp_selected_path_union_skip_undo (); -void sp_selected_path_intersect (); -void sp_selected_path_diff (); -void sp_selected_path_symdiff (); -void sp_selected_path_cut (); -void sp_selected_path_slice (); +void sp_selected_path_union (SPDesktop *desktop); +void sp_selected_path_union_skip_undo (SPDesktop *desktop); +void sp_selected_path_intersect (SPDesktop *desktop); +void sp_selected_path_diff (SPDesktop *desktop); +void sp_selected_path_diff_skip_undo (SPDesktop *desktop); +void sp_selected_path_symdiff (SPDesktop *desktop); +void sp_selected_path_cut (SPDesktop *desktop); +void sp_selected_path_slice (SPDesktop *desktop); // offset/inset of a curve // takes the fill-rule in consideration // offset amount is the stroke-width of the curve -void sp_selected_path_offset (); -void sp_selected_path_offset_screen (double pixels); -void sp_selected_path_inset (); -void sp_selected_path_inset_screen (double pixels); -void sp_selected_path_create_offset (); -void sp_selected_path_create_inset (); -void sp_selected_path_create_updating_offset (); -void sp_selected_path_create_updating_inset (); - -void sp_selected_path_create_offset_object_zero (); -void sp_selected_path_create_updating_offset_object_zero (); +void sp_selected_path_offset (SPDesktop *desktop); +void sp_selected_path_offset_screen (SPDesktop *desktop, double pixels); +void sp_selected_path_inset (SPDesktop *desktop); +void sp_selected_path_inset_screen (SPDesktop *desktop, double pixels); +void sp_selected_path_create_offset (SPDesktop *desktop); +void sp_selected_path_create_inset (SPDesktop *desktop); +void sp_selected_path_create_updating_offset (SPDesktop *desktop); +void sp_selected_path_create_updating_inset (SPDesktop *desktop); + +void sp_selected_path_create_offset_object_zero (SPDesktop *desktop); +void sp_selected_path_create_updating_offset_object_zero (SPDesktop *desktop); // outline of a curve // uses the stroke-width -void sp_selected_path_outline (); +void sp_selected_path_outline (SPDesktop *desktop); +Geom::PathVector* item_outline(SPItem const *item); // simplifies a path (removes small segments and the like) -void sp_selected_path_simplify (); +void sp_selected_path_simplify (SPDesktop *desktop); Path *Path_for_item(SPItem *item, bool doTransformation, bool transformFull = true); -NArtBpath *bpath_for_curve(SPItem *item, SPCurve *curve, bool doTransformation, bool transformFull); +Geom::PathVector* pathvector_for_curve(SPItem *item, SPCurve *curve, bool doTransformation, bool transformFull, Geom::Matrix extraPreAffine, Geom::Matrix extraPostAffine); SPCurve *curve_for_item(SPItem *item); -NR::Maybe get_nearest_position_on_Path(Path *path, NR::Point p); -NR::Point get_point_on_Path(Path *path, int piece, double t); -Path *bpath_to_Path(NArtBpath const *bpath); +boost::optional get_nearest_position_on_Path(Path *path, Geom::Point p, unsigned seg = 0); +Geom::Point get_point_on_Path(Path *path, int piece, double t); #endif @@ -60,4 +65,4 @@ Path *bpath_to_Path(NArtBpath const *bpath); fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :