1 /*
2 Copyright (C) 2012-2021, Dirk Krause
3 SPDX-License-Identifier: BSD-3-Clause
4 */
5 
6 /*
7 	WARNING: This file was generated by the dkct program (see
8 	http://dktools.sourceforge.net/ for details).
9 	Changes you make here will be lost if dkct is run again!
10 	You should modify the original source and run dkct on it.
11 	Original source: dk3bezcu.ctr
12 */
13 
14 /**	@file dk3bezcu.h Header file for the dk3bezcu module.
15 */
16 
17 #ifndef DK3BEZCU_H_INCLUDED
18 /** Avoid multiple inclusions. */
19 #define DK3BEZCU_H_INCLUDED 1
20 
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /**	Bezier curve value calculation.
27 	@param	x0	Start point value.
28 	@param	xp	Value in control point near start.
29 	@param	xm	Value in control point near end.
30 	@param	x1	End point.
31 	@param	t	The t parameter.
32 	@param	ec	Pointer to error code variable, may be NULL.
33 	@return	Calculation result.
34 */
35 double
36 dk3bezier_value(
37   double x0, double xp, double xm, double x1, double t, int *ec
38 );
39 
40 /**	Add Bezier curve segment to bounding box.
41 	@param	bb	Bounding box to modify.
42 	@param	x0	Start point x coordinate.
43 	@param	y0	Start point y coordinate.
44 	@param	xp	Control point near start x coordinate.
45 	@param	yp	Control point near start y coordinate.
46 	@param	xm	Control point near end x coordinate.
47 	@param	ym	Control point near end y coordinate.
48 	@param	x1	End point x coordinate.
49 	@param	y1	End point y coordinate.
50 	@param	ra	Half line width.
51 	@param	ec	Pointer to error code variable, may be NULL.
52 	@return	1 on success, 0 on error.
53 */
54 int
55 dk3bezier_bb(
56   dk3_bb_t	*bb,
57   double	 x0,
58   double	 y0,
59   double	 xp,
60   double	 yp,
61   double	 xm,
62   double	 ym,
63   double	 x1,
64   double	 y1,
65   double	 ra,
66   int		*ec
67 );
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 
74 #endif
75