xref: /aoo4110/main/svtools/source/inc/sgvspln.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SGVSPLN_HXX
25 #define _SGVSPLN_HXX
26 
27 /*************************************************************************
28 |*
29 |*    CalcSpline()
30 |*
31 |*    Beschreibung      Berechnet die Koeffizienten eines parametrischen
32 |*                      nat�rlichen oder periodischen kubischen
33 |*                      Polynomsplines. Die Eckpunkte des �bergebenen
34 |*                      Polygons werden als St�tzstellen angenommen.
35 |*                      n liefert die Anzahl der Teilpolynome.
36 |*                      Ist die Berechnung fehlerfrei verlaufen, so
37 |*                      liefert die Funktion sal_True. Nur in diesem Fall
38 |*                      ist Speicher f�r die Koeffizientenarrays
39 |*                      allokiert, der dann sp�ter vom Aufrufer mittels
40 |*                      delete freizugeben ist.
41 |*    Ersterstellung    JOE 17-08.93
42 |*    Letzte Aenderung  JOE 17-08.93
43 |*
44 *************************************************************************/
45 
46 sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n,
47 				double*& ax, double*& ay, double*& bx, double*& by,
48 				double*& cx, double*& cy, double*& dx, double*& dy, double*& T);
49 
50 /*************************************************************************
51 |*
52 |*    Poly2Spline()
53 |*
54 |*    Beschreibung      Konvertiert einen parametrichen kubischen
55 |*                      Polynomspline Spline (nat�rlich oder periodisch)
56 |*                      in ein angen�hertes Polygon.
57 |*                      Die Funktion liefert sal_False, wenn ein Fehler bei
58 |*                      der Koeffizientenberechnung aufgetreten ist oder
59 |*                      das Polygon zu gro?wird (>PolyMax=16380). Im 1.
60 |*                      Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
61 |*                      Um Koordinaten�berl�ufe zu vermeiden werden diese
62 |*                      auf +/-32000 begrenzt.
63 |*    Ersterstellung    JOE 23.06.93
64 |*    Letzte Aenderung  JOE 23.06.93
65 |*
66 *************************************************************************/
67 sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly);
68 
69 #endif //_SGVSPLN_HXX
70