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>
17 #include <libnr/nr-forward.h>
19 struct NRSVPSegment {
20 gint16 wind;
21 guint16 length;
22 guint32 start;
23 float x0, x1;
24 };
26 struct NRSVPFlat {
27 gint16 wind;
28 guint16 length;
29 float y;
30 float x0, x1;
31 };
33 struct NRSVP {
34 unsigned int length;
35 NR::Point *points;
36 NRSVPSegment segments[1];
37 };
39 #define NR_SVPSEG_IS_FLAT(s,i) (!(s)->segments[i].length)
41 void nr_svp_free (NRSVP *svp);
43 void nr_svp_bbox (NRSVP *svp, NRRect *bbox, unsigned int clear);
45 /* Sorted vertex lists */
47 struct NRVertex {
48 NRVertex *next;
49 NR::Coord x, y;
50 };
53 #endif
55 /*
56 Local Variables:
57 mode:c++
58 c-file-style:"stroustrup"
59 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
60 indent-tabs-mode:nil
61 fill-column:99
62 End:
63 */
64 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :