1
#ifndef SP_DYNA_DRAW_CONTEXT_H_SEEN
2
#define SP_DYNA_DRAW_CONTEXT_H_SEEN
5
* Handwriting-like drawing mode
8
* Mitsuru Oka <oka326@parkcity.ne.jp>
9
* Lauris Kaplinski <lauris@kaplinski.com>
11
* The original dynadraw code:
12
* Paul Haeberli <paul@sgi.com>
14
* Copyright (C) 1998 The Free Software Foundation
15
* Copyright (C) 1999-2002 authors
16
* Copyright (C) 2001-2002 Ximian, Inc.
18
* Released under GNU GPL, read the file 'COPYING' for more information
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 */
46
double hatch_spacing_step;
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;
55
SPCanvasItem *hatch_area;
56
bool just_started_drawing;
60
struct SPDynaDrawContextClass : public SPEventContextClass{};
62
GType sp_dyna_draw_context_get_type(void);
64
#endif // SP_DYNA_DRAW_CONTEXT_H_SEEN
69
c-file-style:"stroustrup"
70
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
75
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :