~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/dyna-draw-context.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SP_DYNA_DRAW_CONTEXT_H_SEEN
 
2
#define SP_DYNA_DRAW_CONTEXT_H_SEEN
 
3
 
 
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
 */
 
20
 
 
21
#include "common-context.h"
 
22
#include "splivarot.h"
 
23
 
 
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))
 
29
 
 
30
class SPDynaDrawContext;
 
31
class SPDynaDrawContextClass;
 
32
 
 
33
#define DDC_MIN_PRESSURE      0.0
 
34
#define DDC_MAX_PRESSURE      1.0
 
35
#define DDC_DEFAULT_PRESSURE  1.0
 
36
 
 
37
#define DDC_MIN_TILT         -1.0
 
38
#define DDC_MAX_TILT          1.0
 
39
#define DDC_DEFAULT_TILT      0.0
 
40
 
 
41
struct SPDynaDrawContext : public SPCommonContext {
 
42
    /** newly created object remain selected */
 
43
    bool keep_selected;
 
44
 
 
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
};
 
59
 
 
60
struct SPDynaDrawContextClass : public SPEventContextClass{};
 
61
 
 
62
GType sp_dyna_draw_context_get_type(void);
 
63
 
 
64
#endif // SP_DYNA_DRAW_CONTEXT_H_SEEN
 
65
 
 
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:encoding=utf-8:textwidth=99 :