#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "potracelib.h"
#include "curve.h"
#include "lists.h"
#include "auxiliary.h"
#include "trace.h"
#include "progress.h"
Go to the source code of this file.
Classes | |
struct | opti_s |
Defines | |
#define | COS179 -0.999847695156 /* the cosine of 179 degrees */ |
#define | INFTY |
#define | SAFE_MALLOC(var, n, typ) if ((var = (typ *)malloc((n)*sizeof(typ))) == NULL) goto malloc_error |
#define | TRY(x) if (x) goto try_error |
Typedefs | |
typedef struct opti_s | opti_t |
typedef double | quadform_t [3][3] |
Functions | |
static int | adjust_vertices (privpath_t *pp) |
static int | bestpolygon (privpath_t *pp) |
static dpoint_t | bezier (double t, dpoint_t p0, dpoint_t p1, dpoint_t p2, dpoint_t p3) |
static int | calc_lon (privpath_t *pp) |
static int | calc_sums (privpath_t *pp) |
static double | cprod (dpoint_t p0, dpoint_t p1, dpoint_t p2, dpoint_t p3) |
static int | cyclic (int a, int b, int c) |
static double | ddenom (dpoint_t p0, dpoint_t p2) |
static double | ddist (dpoint_t p, dpoint_t q) |
static point_t | dorth_infty (dpoint_t p0, dpoint_t p2) |
static double | dpara (dpoint_t p0, dpoint_t p1, dpoint_t p2) |
static double | iprod (dpoint_t p0, dpoint_t p1, dpoint_t p2) |
static double | iprod1 (dpoint_t p0, dpoint_t p1, dpoint_t p2, dpoint_t p3) |
static int | opti_penalty (privpath_t *pp, int i, int j, opti_t *res, double opttolerance, int *convc, double *areac) |
static int | opticurve (privpath_t *pp, double opttolerance) |
static double | penalty3 (privpath_t *pp, int i, int j) |
static void | pointslope (privpath_t *pp, int i, int j, dpoint_t *ctr, dpoint_t *dir) |
int | process_path (path_t *plist, const potrace_param_t *param, progress_t *progress) |
static double | quadform (quadform_t Q, dpoint_t w) |
static int | smooth (privcurve_t *curve, int sign, double alphamax) |
static double | tangent (dpoint_t p0, dpoint_t p1, dpoint_t p2, dpoint_t p3, dpoint_t q0, dpoint_t q1) |
static int | xprod (point_t p1, point_t p2) |
#define COS179 -0.999847695156 /* the cosine of 179 degrees */ |
Definition at line 21 of file potrace/trace.c.
#define INFTY |
10000000 /* it suffices that this is longer than any path; it need not be really infinite */
Definition at line 20 of file potrace/trace.c.
#define SAFE_MALLOC | ( | var, | |
n, | |||
typ | |||
) | if ((var = (typ *)malloc((n)*sizeof(typ))) == NULL) goto malloc_error |
Definition at line 24 of file potrace/trace.c.
Definition at line 1186 of file potrace/trace.c.
Definition at line 900 of file potrace/trace.c.
typedef double quadform_t[3][3] |
Definition at line 142 of file potrace/trace.c.
static int adjust_vertices | ( | privpath_t * | pp | ) | [static] |
Definition at line 631 of file potrace/trace.c.
static int bestpolygon | ( | privpath_t * | pp | ) | [static] |
Definition at line 516 of file potrace/trace.c.
static dpoint_t bezier | ( | double | t, |
dpoint_t | p0, | ||
dpoint_t | p1, | ||
dpoint_t | p2, | ||
dpoint_t | p3 | ||
) | [inline, static] |
Definition at line 210 of file potrace/trace.c.
static int calc_lon | ( | privpath_t * | pp | ) | [static] |
Definition at line 321 of file potrace/trace.c.
static int calc_sums | ( | privpath_t * | pp | ) | [static] |
Definition at line 264 of file potrace/trace.c.
Definition at line 169 of file potrace/trace.c.
static int cyclic | ( | int | a, |
int | b, | ||
int | c | ||
) | [inline, static] |
Definition at line 62 of file potrace/trace.c.
Definition at line 55 of file potrace/trace.c.
Definition at line 205 of file potrace/trace.c.
static point_t dorth_infty | ( | dpoint_t | p0, |
dpoint_t | p2 | ||
) | [inline, static] |
Definition at line 32 of file potrace/trace.c.
Definition at line 42 of file potrace/trace.c.
Definition at line 181 of file potrace/trace.c.
Definition at line 193 of file potrace/trace.c.
static int opti_penalty | ( | privpath_t * | pp, |
int | i, | ||
int | j, | ||
opti_t * | res, | ||
double | opttolerance, | ||
int * | convc, | ||
double * | areac | ||
) | [static] |
Definition at line 905 of file potrace/trace.c.
static int opticurve | ( | privpath_t * | pp, |
double | opttolerance | ||
) | [static] |
Definition at line 1046 of file potrace/trace.c.
static double penalty3 | ( | privpath_t * | pp, |
int | i, | ||
int | j | ||
) | [static] |
Definition at line 474 of file potrace/trace.c.
static void pointslope | ( | privpath_t * | pp, |
int | i, | ||
int | j, | ||
dpoint_t * | ctr, | ||
dpoint_t * | dir | ||
) | [static] |
Definition at line 72 of file potrace/trace.c.
int process_path | ( | path_t * | plist, |
const potrace_param_t * | param, | ||
progress_t * | progress | ||
) |
Definition at line 1189 of file potrace/trace.c.
static double quadform | ( | quadform_t | Q, |
dpoint_t | w | ||
) | [inline, static] |
Definition at line 145 of file potrace/trace.c.
static int smooth | ( | privcurve_t * | curve, |
int | sign, | ||
double | alphamax | ||
) | [static] |
Definition at line 831 of file potrace/trace.c.
static double tangent | ( | dpoint_t | p0, |
dpoint_t | p1, | ||
dpoint_t | p2, | ||
dpoint_t | p3, | ||
dpoint_t | q0, | ||
dpoint_t | q1 | ||
) | [static] |
Definition at line 227 of file potrace/trace.c.
Definition at line 164 of file potrace/trace.c.