1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
typedef enum fz_pathkind_e fz_pathkind;
typedef enum fz_pathelkind_e fz_pathelkind;
typedef struct fz_stroke_s fz_stroke;
typedef struct fz_dash_s fz_dash;
typedef union fz_pathel_s fz_pathel;
enum fz_pathkind_e { FZ_STROKE, FZ_FILL, FZ_EOFILL };
enum fz_pathelkind_e { FZ_MOVETO, FZ_LINETO, FZ_CURVETO, FZ_CLOSEPATH };
struct fz_stroke_s
{
int linecap;
int linejoin;
float linewidth;
float miterlimit;
};
struct fz_dash_s
{
int len;
float phase;
float array[];
};
union fz_pathel_s
{
fz_pathelkind k;
float v;
};
struct fz_path_s
{
fz_node super;
fz_pathkind paint;
fz_stroke *stroke;
fz_dash *dash;
int len, cap;
fz_pathel *els;
};
fz_error *fz_newpath(fz_path **pathp);
fz_error *fz_clonepath(fz_path **pathp, fz_path *oldpath);
fz_error *fz_moveto(fz_path*, float x, float y);
fz_error *fz_lineto(fz_path*, float x, float y);
fz_error *fz_curveto(fz_path*, float, float, float, float, float, float);
fz_error *fz_curvetov(fz_path*, float, float, float, float);
fz_error *fz_curvetoy(fz_path*, float, float, float, float);
fz_error *fz_closepath(fz_path*);
fz_error *fz_endpath(fz_path*, fz_pathkind paint, fz_stroke *stroke, fz_dash *dash);
void fz_freepath(fz_path *path);
fz_rect fz_boundpath(fz_path *node, fz_matrix ctm);
void fz_debugpath(fz_path *node);
fz_error *fz_newdash(fz_dash **dashp, float phase, int len, float *array);
void fz_freedash(fz_dash *dash);
|