Code

Node tool: special case node duplication for endnodes - select new endnode
[inkscape.git] / src / dyna-draw-context.h
1 #ifndef SP_DYNA_DRAW_CONTEXT_H_SEEN
2 #define SP_DYNA_DRAW_CONTEXT_H_SEEN
4 /*
5  * Handwriting-like drawing mode
6  *
7  * Authors:
8  *   Mitsuru Oka <oka326@parkcity.ne.jp>
9  *   Lauris Kaplinski <lauris@kaplinski.com>
10  *
11  * The original dynadraw code:
12  *   Paul Haeberli <paul@sgi.com>
13  *
14  * Copyright (C) 1998 The Free Software Foundation
15  * Copyright (C) 1999-2002 authors
16  * Copyright (C) 2001-2002 Ximian, Inc.
17  *
18  * Released under GNU GPL, read the file 'COPYING' for more information
19  */
21 #include "common-context.h"
22 #include "splivarot.h"
24 #define SP_TYPE_DYNA_DRAW_CONTEXT (sp_dyna_draw_context_get_type())
25 #define SP_DYNA_DRAW_CONTEXT(o) (GTK_CHECK_CAST((o), SP_TYPE_DYNA_DRAW_CONTEXT, SPDynaDrawContext))
26 #define SP_DYNA_DRAW_CONTEXT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SP_TYPE_DYNA_DRAW_CONTEXT, SPDynaDrawContextClass))
27 #define SP_IS_DYNA_DRAW_CONTEXT(o) (GTK_CHECK_TYPE((o), SP_TYPE_DYNA_DRAW_CONTEXT))
28 #define SP_IS_DYNA_DRAW_CONTEXT_CLASS(k) (GTK_CHECK_CLASS_TYPE((k), SP_TYPE_DYNA_DRAW_CONTEXT))
30 class SPDynaDrawContext;
31 class SPDynaDrawContextClass;
33 #define DDC_MIN_PRESSURE      0.0
34 #define DDC_MAX_PRESSURE      1.0
35 #define DDC_DEFAULT_PRESSURE  1.0
37 #define DDC_MIN_TILT         -1.0
38 #define DDC_MAX_TILT          1.0
39 #define DDC_DEFAULT_TILT      0.0
41 struct SPDynaDrawContext : public SPCommonContext {
42     /** newly created object remain selected */
43     bool keep_selected;
45     double hatch_spacing;
46     double hatch_spacing_step;
47     SPItem *hatch_item;
48     Path *hatch_livarot_path;
49     std::list<double> hatch_nearest_past;
50     std::list<double> hatch_pointer_past;
51     std::list<Geom::Point> inertia_vectors;
52     Geom::Point hatch_last_nearest, hatch_last_pointer;
53     std::list<Geom::Point> hatch_vectors;
54     bool hatch_escaped;
55     SPCanvasItem *hatch_area;
56     bool just_started_drawing;
57     bool trace_bg;
58 };
60 struct SPDynaDrawContextClass : public SPEventContextClass{};
62 GType sp_dyna_draw_context_get_type(void);
64 #endif // SP_DYNA_DRAW_CONTEXT_H_SEEN
66 /*
67   Local Variables:
68   mode:c++
69   c-file-style:"stroustrup"
70   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71   indent-tabs-mode:nil
72   fill-column:99
73   End:
74 */
75 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :