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

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/live_effects/lpe-sketch.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
/** \file
 
2
 * @brief LPE sketch effect implementation, see lpe-sketch.cpp.
 
3
 */
 
4
/* Authors:
 
5
 *   Jean-Francois Barraud <jf.barraud@gmail.com>
 
6
 *   Johan Engelen <j.b.c.engelen@utwente.nl>
 
7
 *
 
8
 * Copyright (C) 2007 Authors
 
9
 *
 
10
 * Released under GNU GPL, read the file 'COPYING' for more information
 
11
 */
 
12
 
 
13
#ifndef INKSCAPE_LPE_SKETCH_H
 
14
#define INKSCAPE_LPE_SKETCH_H
 
15
 
 
16
#include "live_effects/effect.h"
 
17
#include "live_effects/parameter/parameter.h"
 
18
#include "live_effects/parameter/random.h"
 
19
#include "live_effects/parameter/point.h"
 
20
 
 
21
#define LPE_SKETCH_USE_CONSTRUCTION_LINES
 
22
//#define LPE_SKETCH_USE_CURVATURE
 
23
 
 
24
namespace Inkscape {
 
25
namespace LivePathEffect {
 
26
 
 
27
class LPESketch : public Effect {
 
28
public:
 
29
    LPESketch(LivePathEffectObject *lpeobject);
 
30
    virtual ~LPESketch();
 
31
 
 
32
    virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
 
33
 
 
34
    virtual void doBeforeEffect (SPLPEItem *lpeitem);
 
35
 
 
36
private:
 
37
    // add the parameters for your effect here:
 
38
    //PointParam testpointA;
 
39
    ScalarParam nbiter_approxstrokes;
 
40
    ScalarParam strokelength;
 
41
    RandomParam strokelength_rdm;
 
42
    ScalarParam strokeoverlap;
 
43
    RandomParam strokeoverlap_rdm;
 
44
    RandomParam ends_tolerance;
 
45
    RandomParam parallel_offset;
 
46
    RandomParam tremble_size;
 
47
    ScalarParam tremble_frequency;
 
48
 
 
49
#ifdef LPE_SKETCH_USE_CONSTRUCTION_LINES
 
50
    ScalarParam nbtangents;
 
51
    ScalarParam tgtscale;
 
52
    ScalarParam tgtlength;
 
53
    RandomParam tgtlength_rdm;
 
54
    RandomParam tgt_places_rdmness;
 
55
#ifdef LPE_SKETCH_USE_CURVATURE
 
56
    ScalarParam min_curvature;
 
57
    ScalarParam max_curvature;
 
58
#endif
 
59
#endif
 
60
    LPESketch(const LPESketch&);
 
61
    LPESketch& operator=(const LPESketch&);
 
62
 
 
63
    Geom::Piecewise<Geom::D2<Geom::SBasis> > computePerturbation (double s0, double s1);
 
64
 
 
65
};
 
66
 
 
67
} //namespace LivePathEffect
 
68
} //namespace Inkscape
 
69
 
 
70
#endif
 
71
 
 
72
/*
 
73
  Local Variables:
 
74
  mode:c++
 
75
  c-file-style:"stroustrup"
 
76
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
77
  indent-tabs-mode:nil
 
78
  fill-column:99
 
79
  End:
 
80
*/
 
81
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :