Sha256: 91342552e6378207cdfa03c40c5b6923b8fdafbcdbc54f48b7539edf6fedb4c6

Contents?: true

Size: 1.06 KB

Versions: 3

Compression:

Stored size: 1.06 KB

Contents

#ifndef _SPIRO_H
#define _SPIRO_H

typedef struct {
/* User passes an array of SpiroCP in this format for Spiro to solve */
    double x;		/* Spiro CodePoint Xloc */
    double y;		/* Spiro CodePoint Yloc */
    char ty;		/* Spiro CodePoint Type */
} spiro_cp;

struct spiro_seg_s {
/* run_spiro() uses array of information given in the structure above and */
/* creates an array in this structure format to use by spiro_to_bpath for */
/* building bezier curves */
    double x;		/* SpiroCP segment_chord startX */
    double y;		/* SpiroCP segment_chord startY */
    char ty;		/* Spiro CodePoint Type */
    double bend_th;	/* bend theta between this vector and next vector */
    double ks[4];
    double seg_ch;	/* segment_chord distance from xy to next SpiroCP */
    double seg_th;	/* segment_theta angle for this SpiroCP */
    double l;
};

typedef struct spiro_seg_s spiro_seg;

spiro_seg *
run_spiro(const spiro_cp *src, int n);

void
free_spiro(spiro_seg *s);

void
spiro_to_bpath(const spiro_seg *s, int n, bezctx *bc);

double get_knot_th(const spiro_seg *s, int i);
#endif

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spiro-0.0.3 ext/spiro/_spiro.h
spiro-0.0.2 ext/spiro/_spiro.h
spiro-0.0.1 ext/spiro/_spiro.h