Code

b559fa5936a451ff020abdde004d2ba4a6f8ef6f
[inkscape.git] / src / spray-context.h
1 #ifndef __SP_SPRAY_CONTEXT_H__
2 #define __SP_SPRAY_CONTEXT_H__
4 /*
5  * Spray Tool
6  *
7  * Authors:
8  *   Pierre-Antoine MARC
9  *   Pierre CACLIN
10  *   Aurel-Aimé MARMION   
11  *   Julien LERAY
12  *   Benoît LAVORATA
13  *   Vincent MONTAGNE
14  *   Pierre BARBRY-BLOT
15  *
16  * Copyright (C) 2009 authors
17  *
18  * Released under GNU GPL, read the file 'COPYING' for more information
19  */
21 #include "event-context.h"
22 #include <display/display-forward.h>
23 #include <libnr/nr-point.h>
24 //#include "ui/widget/spray-option.h"
25 #include "ui/dialog/dialog.h"
27 #define SP_TYPE_SPRAY_CONTEXT (sp_spray_context_get_type())
28 #define SP_SPRAY_CONTEXT(o) (GTK_CHECK_CAST((o), SP_TYPE_SPRAY_CONTEXT, SPSprayContext))
29 #define SP_SPRAY_CONTEXT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SP_TYPE_SPRAY_CONTEXT, SPSprayContextClass))
30 #define SP_IS_SPRAY_CONTEXT(o) (GTK_CHECK_TYPE((o), SP_TYPE_SPRAY_CONTEXT))
31 #define SP_IS_SPRAY_CONTEXT_CLASS(k) (GTK_CHECK_CLASS_TYPE((k), SP_TYPE_SPRAY_CONTEXT))
33 class SPSprayContext;
34 class SPSprayContextClass;
36 namespace Inkscape {
37   namespace UI {
38       namespace Dialog {
39           class Dialog;
40       }
41   }
42 }
45 #define SAMPLING_SIZE 8        /* fixme: ?? */
47 #define TC_MIN_PRESSURE      0.0
48 #define TC_MAX_PRESSURE      1.0
49 #define TC_DEFAULT_PRESSURE  0.35
51 enum {
52     SPRAY_MODE_COPY,
53     SPRAY_MODE_CLONE,
54     SPRAY_MODE_SINGLE_PATH,    
55     SPRAY_OPTION,
56 };
58 struct SPSprayContext
59 {
60     SPEventContext event_context;
61     //Inkscape::UI::Dialog::Dialog *dialog_option;//Attribut de type SprayOptionClass, localisé dans scr/ui/dialog    
62     /* extended input data */
63     gdouble pressure;
65     /* attributes */
66     guint dragging : 1;           /* mouse state: mouse is dragging */
67     guint usepressure : 1;
68     guint usetilt : 1;
69     bool usetext ;
71     double width;
72     double ratio;
73     double tilt;
74     double rotation_variation;
75     double force;
76     double population;
77     double scale_variation;
78     double scale;
79     double mean;
80     double standard_deviation;
81    
82     gint distrib;
84     gint mode;
86     Inkscape::MessageContext *_message_context;
88     bool is_drawing;
90     bool is_dilating;
91     bool has_dilated;
92     Geom::Point last_push;
93     SPCanvasItem *dilate_area;
95     bool do_h;
96     bool do_s;
97     bool do_l;
98     bool do_o;
100     sigc::connection style_set_connection;
101 };
103 struct SPSprayContextClass
105     SPEventContextClass parent_class;
106 };
108 GtkType sp_spray_context_get_type(void);
111 #endif
113 /*
114   Local Variables:
115   mode:c++
116   c-file-style:"stroustrup"
117   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
118   indent-tabs-mode:nil
119   fill-column:99
120   End:
121 */
122 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :