GCC Code Coverage Report


Directory: ./
File: include/2geom/sbasis-to-bezier.h
Date: 2024-03-18 17:01:34
Exec Total Coverage
Lines: 0 2 0.0%
Functions: 0 1 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * \file
3 * \brief Conversion between SBasis and Bezier basis polynomials
4 *//*
5 * Authors:
6 * ? <?@?.?>
7 *
8 * Copyright ?-? authors
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it either under the terms of the GNU Lesser General Public
12 * License version 2.1 as published by the Free Software Foundation
13 * (the "LGPL") or, at your option, under the terms of the Mozilla
14 * Public License Version 1.1 (the "MPL"). If you do not alter this
15 * notice, a recipient may use your version of this file under either
16 * the MPL or the LGPL.
17 *
18 * You should have received a copy of the LGPL along with this library
19 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * You should have received a copy of the MPL along with this library
22 * in the file COPYING-MPL-1.1
23 *
24 * The contents of this file are subject to the Mozilla Public License
25 * Version 1.1 (the "License"); you may not use this file except in
26 * compliance with the License. You may obtain a copy of the License at
27 * http://www.mozilla.org/MPL/
28 *
29 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
30 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
31 * the specific language governing rights and limitations.
32 *
33 */
34
35 #ifndef LIB2GEOM_SEEN_SBASIS_TO_BEZIER_H
36 #define LIB2GEOM_SEEN_SBASIS_TO_BEZIER_H
37
38 #include <2geom/d2.h>
39 #include <2geom/pathvector.h>
40
41 #include <vector>
42
43 namespace Geom {
44
45 class PathBuilder;
46
47 void sbasis_to_bezier (Bezier &bz, SBasis const &sb, size_t sz = 0);
48 void sbasis_to_bezier (D2<Bezier> &bz, D2<SBasis> const &sb, size_t sz = 0);
49 void sbasis_to_bezier (std::vector<Point> & bz, D2<SBasis> const& sb, size_t sz = 0);
50 void sbasis_to_cubic_bezier (std::vector<Point> & bz, D2<SBasis> const& sb);
51 void bezier_to_sbasis (SBasis & sb, Bezier const& bz);
52 void bezier_to_sbasis (D2<SBasis> & sb, std::vector<Point> const& bz);
53 void build_from_sbasis(PathBuilder &pb, D2<SBasis> const &B, double tol, bool only_cubicbeziers);
54
55 #if 0
56 // this produces a degree k bezier from a degree k sbasis
57 Bezier
58 sbasis_to_bezier(SBasis const &B, unsigned q = 0);
59
60 // inverse
61 SBasis bezier_to_sbasis(Bezier const &B);
62
63
64 std::vector<Geom::Point>
65 sbasis_to_bezier(D2<SBasis> const &B, unsigned q = 0);
66 #endif
67
68
69 PathVector path_from_piecewise(Piecewise<D2<SBasis> > const &B, double tol, bool only_cubicbeziers = false);
70
71 Path path_from_sbasis(D2<SBasis> const &B, double tol, bool only_cubicbeziers = false);
72 inline Path cubicbezierpath_from_sbasis(D2<SBasis> const &B, double tol)
73 { return path_from_sbasis(B, tol, true); }
74
75 } // end namespace Geom
76
77 #endif
78 /*
79 Local Variables:
80 mode:c++
81 c-file-style:"stroustrup"
82 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
83 indent-tabs-mode:nil
84 fill-column:99
85 End:
86 */
87 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
88