X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fsvgtiny_internal.h;h=5ece69d42c1ab66cfa52a46321e31d3f9b67fe8e;hb=7b8fc7bb381c266a4f1ecde5b10bb4c09e2f9bc0;hp=542a0d0cd565cbdbbb0714d19c278f71d75e4ed7;hpb=f15555ee16921352ec00f90e8687b4a17f8195bb;p=libsvgtiny.git diff --git a/src/svgtiny_internal.h b/src/svgtiny_internal.h index 542a0d0..5ece69d 100644 --- a/src/svgtiny_internal.h +++ b/src/svgtiny_internal.h @@ -11,6 +11,7 @@ #include #include +#include #ifndef UNUSED #define UNUSED(x) ((void) (x)) @@ -24,6 +25,16 @@ 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; dom_document *document; @@ -36,27 +47,48 @@ 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