Code

Fixed SVG compliance problems with feMorphology (bug 181995 at least)
[inkscape.git] / src / display / guideline.h
1 #ifndef __SP_GUIDELINE_H__
2 #define __SP_GUIDELINE_H__
4 /*
5  * The visual representation of SPGuide.
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Johan Engelen
10  *
11  * Copyright (C) 2000-2002 Lauris Kaplinski
12  * Copyright (C) 2007 Johan Engelen
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include "sp-canvas.h"
18 #include <2geom/point.h>
20 #define SP_TYPE_GUIDELINE (sp_guideline_get_type())
21 #define SP_GUIDELINE(o) (GTK_CHECK_CAST((o), SP_TYPE_GUIDELINE, SPGuideLine))
22 #define SP_IS_GUIDELINE(o) (GTK_CHECK_TYPE((o), SP_TYPE_GUIDELINE))
24 struct SPGuideLine {
25     SPCanvasItem item;
27     guint32 rgba;
29     Geom::Point normal_to_line;
30     Geom::Point point_on_line;
31     double angle;
33     unsigned int sensitive : 1;
35     inline bool is_horizontal() const { return (normal_to_line[Geom::X] == 0.); };
36     inline bool is_vertical() const { return (normal_to_line[Geom::Y] == 0.); };
37 };
39 struct SPGuideLineClass {
40     SPCanvasItemClass parent_class;
41 };
43 GType sp_guideline_get_type();
45 SPCanvasItem *sp_guideline_new(SPCanvasGroup *parent, Geom::Point point_on_line, Geom::Point normal);
47 void sp_guideline_set_position(SPGuideLine *gl, Geom::Point point_on_line);
48 void sp_guideline_set_normal(SPGuideLine *gl, Geom::Point normal_to_line);
49 void sp_guideline_set_color(SPGuideLine *gl, unsigned int rgba);
50 void sp_guideline_set_sensitive(SPGuideLine *gl, int sensitive);
52 #endif
54 /*
55   Local Variables:
56   mode:c++
57   c-file-style:"stroustrup"
58   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59   indent-tabs-mode:nil
60   fill-column:99
61   End:
62 */
63 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :