/* * This file is part of Libsvgtiny * Licensed under the MIT License, * http://opensource.org/licenses/mit-license.php * Copyright 2008 James Bursa */ #ifndef SVGTINY_INTERNAL_H #define SVGTINY_INTERNAL_H #include #include #include #ifndef UNUSED #define UNUSED(x) ((void) (x)) #endif struct svgtiny_gradient_stop { float offset; svgtiny_colour color; }; #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; float viewport_width; float viewport_height; /* current transformation matrix */ struct { float a, b, c, d, e, f; } ctm; /* 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