nr-svp.cpp revision 3955580a5a68a873b098921626f5b9d841b964ec
#define __NR_SVP_C__
/*
* Pixel buffer rendering library
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* This code is in public domain
*/
#define noNR_VERBOSE
#define NR_SVP_LENGTH_MAX 128
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
#include "nr-rect.h"
#include "nr-svp-private.h"
/* Sorted vector paths */
void
{
}
void
{
unsigned int sidx;
}
}
} else {
}
}
}
/* NRVertex */
#define NR_VERTEX_ALLOC_SIZE 4096
NRVertex *
nr_vertex_new (void)
{
NRVertex * v;
#ifndef NR_VERTEX_ALLOC
v = ffvertex;
if (v == NULL) {
int i;
ffvertex = v + 1;
} else {
}
#else
#endif
return v;
}
NRVertex *
{
NRVertex * v;
g_critical("nr_vertex_new_xy: BUG: Coordinates are not finite");
x = y = 0;
g_critical("nr_vertex_new_xy: Coordinates out of range");
x = y = 0;
}
v = nr_vertex_new ();
v->x = x;
v->y = y;
return v;
}
void
nr_vertex_free_one (NRVertex * v)
{
#ifndef NR_VERTEX_ALLOC
ffvertex = v;
#else
g_free (v);
#endif
}
void
nr_vertex_free_list (NRVertex * v)
{
#ifndef NR_VERTEX_ALLOC
NRVertex * l;
ffvertex = v;
#else
NRVertex *l, *n;
l = v;
while (l) {
n = l->next;
g_free (l);
l = n;
}
#endif
}
NRVertex *
{
NRVertex * p;
p = NULL;
while (v) {
NRVertex * n;
n = v->next;
v->next = p;
p = v;
v = n;
}
return p;
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :