X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fsvgtiny_internal.h;h=5ece69d42c1ab66cfa52a46321e31d3f9b67fe8e;hb=7b8fc7bb381c266a4f1ecde5b10bb4c09e2f9bc0;hp=13db00e4ffd6841450fb5c1f0b186c27f7cada69;hpb=5533143958b16ed87026cdf533fc4d544b2d712f;p=libsvgtiny.git diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index 13db00e..5ece69d 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -10,6 +10,9 @@ #include +#include +#include + #ifndef UNUSED #define UNUSED(x) ((void) (x)) #endif @@ -22,9 +25,19 @@ struct svgtiny_gradient_stop { #define svgtiny_MAX_STOPS 10 #define svgtiny_LINEAR_GRADIENT 0x2000000 +struct svgtiny_parse_state_gradient { + unsigned int linear_gradient_stop_count; + dom_string *gradient_x1, *gradient_y1, *gradient_x2, *gradient_y2; + struct svgtiny_gradient_stop gradient_stop[svgtiny_MAX_STOPS]; + bool gradient_user_space_on_use; + struct { + float a, b, c, d, e, f; + } gradient_transform; +}; + struct svgtiny_parse_state { struct svgtiny_diagram *diagram; - xmlDoc *document; + dom_document *document; float viewport_width; float viewport_height; @@ -34,47 +47,85 @@ struct svgtiny_parse_state { float a, b, c, d, e, f; } ctm; - /*struct css_style style;*/ + /* A libcss context to hold any stylesheets that are present + * in the SVG document. This should be pre-populated rather + * than on-the-fly, because, for example, a