Blame spiroentrypoints.h

rpm-build 8267b0
#ifndef _SPIROENTRYPOINTS_H
rpm-build 8267b0
# define _SPIROENTRYPOINTS_H
rpm-build 8267b0
# include "bezctx_intf.h"
rpm-build 8267b0
# include "spiro.h"
rpm-build 8267b0
rpm-build 8267b0
    /* Possible values of the "ty" field. */
rpm-build 8267b0
#define SPIRO_CORNER		'v'
rpm-build 8267b0
#define SPIRO_G4		'o'
rpm-build 8267b0
#define SPIRO_G2		'c'
rpm-build 8267b0
#define SPIRO_LEFT		'['
rpm-build 8267b0
#define SPIRO_RIGHT		']'
rpm-build 8267b0
rpm-build 8267b0
    /* For a closed contour add an extra cp with a ty set to */
rpm-build 8267b0
#define SPIRO_END		'z'
rpm-build 8267b0
    /* For an open contour the first cp must have a ty set to*/
rpm-build 8267b0
#define SPIRO_OPEN_CONTOUR	'{'
rpm-build 8267b0
    /* For an open contour the last cp must have a ty set to */
rpm-build 8267b0
#define SPIRO_END_OPEN_CONTOUR	'}'
rpm-build 8267b0
rpm-build 8267b0
/* These 2 functions are kept for backwards compatibility for older */
rpm-build 8267b0
/* programs. Please use the functions listed afterwards that return */
rpm-build 8267b0
/* success/failure replies when done.				    */
rpm-build 8267b0
extern void TaggedSpiroCPsToBezier(spiro_cp *spiros,bezctx *bc);
rpm-build 8267b0
extern void SpiroCPsToBezier(spiro_cp *spiros,int n,int isclosed,bezctx *bc);
rpm-build 8267b0
rpm-build 8267b0
rpm-build 8267b0
rpm-build 8267b0
/* These functions are available in libspiro-0.2.20130930 or higher */
rpm-build 8267b0
rpm-build 8267b0
/* The two functions below return 1 upon success and 0 upon failure */
rpm-build 8267b0
rpm-build 8267b0
/* The spiros array should indicate it's own end... So              */
rpm-build 8267b0
/* Open contours must have the ty field of the first cp set to '{'  */
rpm-build 8267b0
/*               and have the ty field of the last cp set to '}'    */
rpm-build 8267b0
/* Closed contours must have an extra cp at the end whose ty is 'z' */
rpm-build 8267b0
/*               the x&y values of this extra cp are ignored        */
rpm-build 8267b0
extern int TaggedSpiroCPsToBezier0(spiro_cp *spiros,bezctx *bc);
rpm-build 8267b0
rpm-build 8267b0
/* The first argument is an array of spiro control points.          */
rpm-build 8267b0
/* Open contours do not need to start with '{', nor to end with '}' */
rpm-build 8267b0
/* Close contours do not need to end with 'z'                       */
rpm-build 8267b0
extern int SpiroCPsToBezier0(spiro_cp *spiros,int n,int isclosed,bezctx *bc);
rpm-build 8267b0
rpm-build 8267b0
rpm-build 8267b0
rpm-build 8267b0
/* These functions are available in libspiro-0.3.20150131 or higher */
rpm-build 8267b0
rpm-build 8267b0
/* If you can't use TaggedSpiroCPsToBezier0(), SpiroCPsToBezier0(), */
rpm-build 8267b0
/* these functions are enhanced versions of the original functions, */
rpm-build 8267b0
/* where spiro success/failure replies are passd back through *done */
rpm-build 8267b0
extern void TaggedSpiroCPsToBezier1(spiro_cp *spiros,bezctx *bc,int *done);
rpm-build 8267b0
extern void SpiroCPsToBezier1(spiro_cp *spiros,int n,int isclosed,bezctx *bc,int *done);
rpm-build 8267b0
#endif