Code

Fix canvas resize
[inkscape.git] / src / sp-stop.h
1 #ifndef SEEN_SP_STOP_H
2 #define SEEN_SP_STOP_H
4 /** \file
5  * SPStop: SVG <stop> implementation.
6  */
7 /*
8  * Authors?
9  */
11 #include <glib/gtypes.h>
12 #include "sp-object.h"
13 #include "color.h"
15 class SPObjectClass;
16 class SPColor;
18 struct SPStop;
19 struct SPStopClass;
21 #define SP_TYPE_STOP (sp_stop_get_type())
22 #define SP_STOP(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_STOP, SPStop))
23 #define SP_STOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_STOP, SPStopClass))
24 #define SP_IS_STOP(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_STOP))
25 #define SP_IS_STOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_STOP))
27 GType sp_stop_get_type();
29 /** Gradient stop. */
30 struct SPStop : public SPObject {
31     /// \todo fixme: Should be SPSVGPercentage
32     gfloat offset;
34     bool currentColor;
36     /** \note
37      * N.B.\ Meaningless if currentColor is true.  Use sp_stop_get_rgba32 or sp_stop_get_color
38      * (currently static in sp-gradient.cpp) if you want the effective color.
39      */
40     SPColor specified_color;
42     /// \todo fixme: Implement SPSVGNumber or something similar.
43     gfloat opacity;
46     SPStop* getNextStop();
47     SPStop* getPrevStop();
48 };
50 /// The SPStop vtable.
51 struct SPStopClass {
52     SPObjectClass parent_class;
53 };
55 guint32 sp_stop_get_rgba32(SPStop const *);
58 #endif /* !SEEN_SP_STOP_H */
60 /*
61   Local Variables:
62   mode:c++
63   c-file-style:"stroustrup"
64   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
65   indent-tabs-mode:nil
66   fill-column:99
67   End:
68 */
69 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :