pcb 4.1.1
An interactive printed circuit board layout editor.

potracelib.h File Reference

this file defines the API for the core Potrace library. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  potrace_progress_s
 Structure to hold progress bar callback data. More...
struct  potrace_param_s
 Structure to hold tracing parameters. More...
struct  potrace_bitmap_s
 Internal bitmap format. More...
struct  potrace_dpoint_s
 Point. More...
struct  potrace_curve_s
 Closed curve segment. More...
struct  potrace_path_s
 Linked list of signed curve segments. More...
struct  potrace_state_s
 Potrace state. More...

Defines

#define POTRACE_TURNPOLICY_BLACK   0
#define POTRACE_TURNPOLICY_WHITE   1
#define POTRACE_TURNPOLICY_LEFT   2
#define POTRACE_TURNPOLICY_RIGHT   3
#define POTRACE_TURNPOLICY_MINORITY   4
#define POTRACE_TURNPOLICY_MAJORITY   5
#define POTRACE_TURNPOLICY_RANDOM   6
#define POTRACE_CURVETO   1
#define POTRACE_CORNER   2
#define POTRACE_STATUS_OK   0
#define POTRACE_STATUS_INCOMPLETE   1

Typedefs

typedef struct potrace_progress_s potrace_progress_t
typedef struct potrace_param_s potrace_param_t
typedef unsigned long potrace_word
 Native word size.
typedef struct potrace_bitmap_s potrace_bitmap_t
typedef struct potrace_dpoint_s potrace_dpoint_t
typedef struct potrace_curve_s potrace_curve_t
typedef struct potrace_path_s potrace_path_t
typedef struct potrace_state_s potrace_state_t

Functions

potrace_param_tpotrace_param_default (void)
 Get default parameters.
void potrace_param_free (potrace_param_t *p)
 Free parameter set.
potrace_state_tpotrace_trace (const potrace_param_t *param, const potrace_bitmap_t *bm)
 Trace a bitmap.
void potrace_state_free (potrace_state_t *st)
 Free a Potrace state.
char * potrace_version (void)
 Return a static plain text version string identifying this version of potracelib.

Detailed Description

this file defines the API for the core Potrace library.

For a more detailed description of the API, see doc/potracelib.txt.


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 potracelib.h.


Define Documentation

#define POTRACE_CORNER   2

Definition at line 101 of file potracelib.h.

Referenced by smooth().

#define POTRACE_CURVETO   1

Definition at line 100 of file potracelib.h.

Referenced by opticurve(), and smooth().

#define POTRACE_STATUS_INCOMPLETE   1

Definition at line 139 of file potracelib.h.

#define POTRACE_STATUS_OK   0

Definition at line 138 of file potracelib.h.

#define POTRACE_TURNPOLICY_BLACK   0

Definition at line 27 of file potracelib.h.

Referenced by findpath().

#define POTRACE_TURNPOLICY_LEFT   2

Definition at line 29 of file potracelib.h.

#define POTRACE_TURNPOLICY_MAJORITY   5

Definition at line 32 of file potracelib.h.

Referenced by findpath().

#define POTRACE_TURNPOLICY_MINORITY   4

Definition at line 31 of file potracelib.h.

Referenced by findpath(), and gcode_do_export().

#define POTRACE_TURNPOLICY_RANDOM   6

Definition at line 33 of file potracelib.h.

Referenced by findpath().

#define POTRACE_TURNPOLICY_RIGHT   3

Definition at line 30 of file potracelib.h.

Referenced by findpath().

#define POTRACE_TURNPOLICY_WHITE   1

Definition at line 28 of file potracelib.h.

Referenced by findpath().


Typedef Documentation

Definition at line 85 of file potracelib.h.

Definition at line 114 of file potracelib.h.

Definition at line 97 of file potracelib.h.

Definition at line 60 of file potracelib.h.

Definition at line 134 of file potracelib.h.

Definition at line 46 of file potracelib.h.

Definition at line 150 of file potracelib.h.

typedef unsigned long potrace_word

Native word size.

Definition at line 68 of file potracelib.h.


Function Documentation

potrace_param_t* potrace_param_default ( void  )

Get default parameters.

void potrace_param_free ( potrace_param_t p)

Free parameter set.

void potrace_state_free ( potrace_state_t st)

Free a Potrace state.

potrace_state_t* potrace_trace ( const potrace_param_t param,
const potrace_bitmap_t bm 
)

Trace a bitmap.

char* potrace_version ( void  )

Return a static plain text version string identifying this version of potracelib.