pcb 4.1.1
An interactive printed circuit board layout editor.

curve.h File Reference

Header file for path and curve data structures. More...

#include "auxiliary.h"
Include dependency graph for curve.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  privcurve_s
  More...
struct  sums_s
struct  potrace_privpath_s
  More...

Typedefs

typedef struct privcurve_s privcurve_t
typedef struct sums_s sums_t
typedef struct potrace_privpath_s potrace_privpath_t
typedef potrace_privpath_t privpath_t
typedef potrace_path_t path_t

Functions

path_tpath_new (void)
 Create a new path.
void path_free (path_t *p)
 Free a path.
void pathlist_free (path_t *plist)
 Free a pathlist.
int privcurve_init (privcurve_t *curve, int n)
 Initialize the members of the given curve structure to size m.
void privcurve_to_curve (privcurve_t *pc, potrace_curve_t *c)
 Copy private to public curve structure.

Detailed Description

Header file for path and curve data structures.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 2001-2007 Peter Selinger.

This file is part of Potrace. It is free software and it is covered by the GNU General Public License. See the file COPYING for details.

Definition in file curve.h.


Typedef Documentation

Definition at line 92 of file curve.h.

Definition at line 88 of file curve.h.

typedef struct privcurve_s privcurve_t

Definition at line 51 of file curve.h.

Definition at line 91 of file curve.h.

typedef struct sums_s sums_t

Definition at line 61 of file curve.h.


Function Documentation

void path_free ( path_t p)

Free a path.

Leave errno untouched.

Definition at line 77 of file curve.c.

References potrace_privpath_s::curve, potrace_privpath_s::lon, potrace_privpath_s::ocurve, potrace_privpath_s::po, potrace_path_s::priv, privcurve_free_members(), potrace_privpath_s::pt, and potrace_privpath_s::sums.

Referenced by bm_to_pathlist(), and pathlist_free().

Here is the call graph for this function:

path_t* path_new ( void  )

Create a new path.

Definition at line 37 of file curve.c.

References potrace_path_s::priv, and SAFE_MALLOC.

Referenced by findpath().

void pathlist_free ( path_t plist)

Free a pathlist.

Leave errno untouched.

Definition at line 102 of file curve.c.

References list_forall_unlink, and path_free().

Referenced by gcode_do_export().

Here is the call graph for this function:

int privcurve_init ( privcurve_t curve,
int  n 
)

Initialize the members of the given curve structure to size m.

Returns:
0 on success, 1 on error with errno set.

Definition at line 122 of file curve.c.

References privcurve_s::alpha, privcurve_s::alpha0, privcurve_s::beta, privcurve_s::c, n, privcurve_s::n, SAFE_MALLOC, privcurve_s::tag, and privcurve_s::vertex.

Referenced by adjust_vertices(), and opticurve().

void privcurve_to_curve ( privcurve_t pc,
potrace_curve_t c 
)

Copy private to public curve structure.

Definition at line 148 of file curve.c.

References privcurve_s::c, potrace_curve_s::c, privcurve_s::n, potrace_curve_s::n, privcurve_s::tag, and potrace_curve_s::tag.