Code

moving trunk for module inkscape
[inkscape.git] / src / libnr / nr-svp.h
1 #ifndef __NR_SVP_H__
2 #define __NR_SVP_H__
4 /*
5  * Pixel buffer rendering library
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *
10  * This code is in public domain
11  */
13 /* Sorted vector paths */
15 #include <glib/gtypes.h>
16 #include <libnr/nr-coord.h>
18 struct NRPoint;
20 struct NRSVPSegment {
21     gint16 wind;
22     guint16 length;
23     guint32 start;
24     float x0, x1;
25 };
27 struct NRSVPFlat {
28     gint16 wind;
29     guint16 length;
30     float y;
31     float x0, x1;
32 };
34 struct NRSVP {
35     unsigned int length;
36     NRPoint *points;
37     NRSVPSegment segments[1];
38 };
40 #define NR_SVPSEG_IS_FLAT(s,i) (!(s)->segments[i].length)
42 void nr_svp_free (NRSVP *svp);
44 void nr_svp_bbox (NRSVP *svp, NRRect *bbox, unsigned int clear);
46 /* Sorted vertex lists */
48 struct NRVertex {
49     NRVertex *next;
50     NR::Coord x, y;
51 };
54 #endif
56 /*
57   Local Variables:
58   mode:c++
59   c-file-style:"stroustrup"
60   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
61   indent-tabs-mode:nil
62   fill-column:99
63   End:
64 */
65 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :