From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- src/path/path-util.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/path/path-util.h (limited to 'src/path/path-util.h') diff --git a/src/path/path-util.h b/src/path/path-util.h new file mode 100644 index 0000000..6db5aec --- /dev/null +++ b/src/path/path-util.h @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * Path utilities. + *//* + * Authors: see git history + * + * Copyright (C) 2018 Authors + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ +#ifndef PATH_UTIL_H +#define PATH_UTIL_H + +#include <2geom/forward.h> +#include <2geom/path.h> + +#include "livarot/Path.h" + +#include + +class SPCurve; +class SPItem; + +Path *Path_for_pathvector(Geom::PathVector const &pathv); +Path *Path_for_item(SPItem *item, bool doTransformation, bool transformFull = true); +Path *Path_for_item_before_LPE(SPItem *item, bool doTransformation, bool transformFull = true); +Geom::PathVector* pathvector_for_curve(SPItem *item, SPCurve *curve, bool doTransformation, bool transformFull, Geom::Affine extraPreAffine, Geom::Affine extraPostAffine); +std::unique_ptr curve_for_item(SPItem *item); +std::unique_ptr curve_for_item_before_LPE(SPItem *item); +std::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 // PATH_UTIL_H + +/* + 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 : -- cgit v1.2.3