diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/sp-gradient.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/sp-gradient.h')
| -rw-r--r-- | src/sp-gradient.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/src/sp-gradient.h b/src/sp-gradient.h new file mode 100644 index 000000000..9c152598b --- /dev/null +++ b/src/sp-gradient.h @@ -0,0 +1,95 @@ +#ifndef __SP_GRADIENT_H__ +#define __SP_GRADIENT_H__ + +/** \file + * SVG <stop> <linearGradient> and <radialGradient> implementation + * + * Authors: + * Lauris Kaplinski <lauris@kaplinski.com> + * + * Copyright (C) 1999-2002 Lauris Kaplinski + * Copyright (C) 2000-2001 Ximian, Inc. + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include <gdk/gdktypes.h> +#include "libnr/nr-matrix.h" +#include "sp-paint-server.h" +#include "sp-gradient-spread.h" +#include "sp-gradient-units.h" +#include "sp-gradient-vector.h" + +struct SPGradientReference; + +typedef enum { + SP_GRADIENT_TYPE_UNKNOWN, + SP_GRADIENT_TYPE_LINEAR, + SP_GRADIENT_TYPE_RADIAL +} SPGradientType; + +typedef enum { + SP_GRADIENT_STATE_UNKNOWN, + SP_GRADIENT_STATE_VECTOR, + SP_GRADIENT_STATE_PRIVATE +} SPGradientState; + +typedef enum { + POINT_LG_P1, + POINT_LG_P2, + POINT_RG_CENTER, + POINT_RG_R1, + POINT_RG_R2, + POINT_RG_FOCUS +} GrPoint; + +/** + * Gradient + * + * Implement spread, stops list + * \todo fixme: Implement more here (Lauris) + */ +struct SPGradient : public SPPaintServer { + /** Reference (href) */ + SPGradientReference *ref; + /** State in Inkscape gradient system */ + guint state : 2; + /** gradientUnits attribute */ + SPGradientUnits units; + guint units_set : 1; + /** gradientTransform attribute */ + NR::Matrix gradientTransform; + guint gradientTransform_set : 1; + /** spreadMethod attribute */ + SPGradientSpread spread; + guint spread_set : 1; + /** Gradient stops */ + guint has_stops : 1; + /** Composed vector */ + SPGradientVector vector; + /** Rendered color array (4 * 1024 bytes) */ + guchar *color; +}; + +/** + * The SPGradient vtable. + */ +struct SPGradientClass { + SPPaintServerClass parent_class; +}; + + +#include "sp-gradient-fns.h" + +#endif /* !__SP_GRADIENT_H__ */ + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : |
