summaryrefslogtreecommitdiff
path: root/svgtiny_internal.h
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2008-03-10 04:43:44 +0000
committerJames Bursa <james@netsurf-browser.org>2008-03-10 04:43:44 +0000
commit7b91fce804524d4f868f7f08fcbfc78402e0f59f (patch)
treee5c15bd22bd20935792dcbdb610c0ff4ec9c717e /svgtiny_internal.h
parent77eaa3c8caf677ae5a676cf3220bf1b3cdf2076b (diff)
downloadlibsvgtiny-7b91fce804524d4f868f7f08fcbfc78402e0f59f.tar.gz
libsvgtiny-7b91fce804524d4f868f7f08fcbfc78402e0f59f.tar.bz2
Work on linearGradient attributes gradientUnits and gradientTransform. Adapt number of segment steps depending on difference in gradient.
svn path=/trunk/libsvgtiny/; revision=3914
Diffstat (limited to 'svgtiny_internal.h')
-rw-r--r--svgtiny_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/svgtiny_internal.h b/svgtiny_internal.h
index 84ecf5c..a729f25 100644
--- a/svgtiny_internal.h
+++ b/svgtiny_internal.h
@@ -8,6 +8,8 @@
#ifndef SVGTINY_INTERNAL_H
#define SVGTINY_INTERNAL_H
+#include <stdbool.h>
+
struct svgtiny_gradient_stop {
float offset;
svgtiny_colour color;
@@ -39,6 +41,10 @@ struct svgtiny_parse_state {
unsigned int linear_gradient_stop_count;
const char *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;
};
@@ -47,6 +53,8 @@ float svgtiny_parse_length(const char *s, int viewport_size,
const struct svgtiny_parse_state state);
void svgtiny_parse_color(const char *s, svgtiny_colour *c,
struct svgtiny_parse_state *state);
+void svgtiny_parse_transform(char *s, float *ma, float *mb,
+ float *mc, float *md, float *me, float *mf);
struct svgtiny_shape *svgtiny_add_shape(struct svgtiny_parse_state *state);
void svgtiny_transform_path(float *p, unsigned int n,
struct svgtiny_parse_state *state);