X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fsvgtiny_internal.h;h=7480f233539cdeb11b89aa7c319ec5d084c74dc3;hb=3e5238db0f40672c24530f2443f834c3f7b7ca1a;hp=3ea6e7b49d511b7ece2145bb81870156158b492a;hpb=1e4fbffc36f3c7dc959936e3049b0ad8d5dde4d1;p=libsvgtiny.git diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index 3ea6e7b..7480f23 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,7 +47,12 @@ 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