Code

66e2ee50ee4305a972c1f1172e37817a0959a4bb
[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;
34 };
36 struct SPGuideLineClass {
37     SPCanvasItemClass parent_class;
38 };
40 GType sp_guideline_get_type();
42 SPCanvasItem *sp_guideline_new(SPCanvasGroup *parent, Geom::Point point_on_line, Geom::Point normal);
44 void sp_guideline_set_position(SPGuideLine *gl, Geom::Point point_on_line);
45 void sp_guideline_set_normal(SPGuideLine *gl, Geom::Point normal_to_line);
46 void sp_guideline_set_color(SPGuideLine *gl, unsigned int rgba);
47 void sp_guideline_set_sensitive(SPGuideLine *gl, int sensitive);
49 #endif
51 /*
52   Local Variables:
53   mode:c++
54   c-file-style:"stroustrup"
55   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
56   indent-tabs-mode:nil
57   fill-column:99
58   End:
59 */
60 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :