1 | #ifndef SOURCE_SVG_IMP_H |
2 | #define SOURCE_SVG_IMP_H |
3 | |
4 | typedef struct svg_document_s svg_document; |
5 | |
6 | struct svg_document_s |
7 | { |
8 | fz_document super; |
9 | fz_xml_doc *xml; |
10 | fz_xml *root; |
11 | fz_tree *idmap; |
12 | float width; |
13 | float height; |
14 | fz_archive *zip; /* for locating external resources */ |
15 | char base_uri[2048]; |
16 | }; |
17 | |
18 | const char *svg_lex_number(float *fp, const char *str); |
19 | float svg_parse_number(const char *str, float min, float max, float inherit); |
20 | float svg_parse_length(const char *str, float percent, float font_size); |
21 | float svg_parse_angle(const char *str); |
22 | |
23 | void svg_parse_color_from_style(fz_context *ctx, svg_document *doc, const char *str, |
24 | int *fill_is_set, float fill[3], int *stroke_is_set, float stroke[3]); |
25 | void svg_parse_color(fz_context *ctx, svg_document *doc, const char *str, float *rgb); |
26 | fz_matrix svg_parse_transform(fz_context *ctx, svg_document *doc, const char *str, fz_matrix transform); |
27 | |
28 | int svg_is_whitespace_or_comma(int c); |
29 | int svg_is_whitespace(int c); |
30 | int svg_is_alpha(int c); |
31 | int svg_is_digit(int c); |
32 | |
33 | void svg_parse_document_bounds(fz_context *ctx, svg_document *doc, fz_xml *root); |
34 | void svg_run_document(fz_context *ctx, svg_document *doc, fz_xml *root, fz_device *dev, fz_matrix ctm); |
35 | |
36 | #endif |
37 | |