Code

Extensions. Add option to choose dxf output units
[inkscape.git] / src / live_effects / lpe-rough-hatches.h
1 #ifndef INKSCAPE_LPE_ROUGH_HATCHES_H
2 #define INKSCAPE_LPE_ROUGH_HATCHES_H
4 /** \file
5  * Fills an area with rough hatches.
6  */
8 /*
9  * Authors:
10  *   JFBarraud
11  *
12  * Copyright (C) JF Barraud 2008.
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include "live_effects/effect.h"
18 #include "live_effects/parameter/point.h"
19 #include "live_effects/parameter/parameter.h"
20 #include "live_effects/parameter/bool.h"
21 #include "live_effects/parameter/random.h"
22 #include "live_effects/parameter/vector.h"
24 namespace Inkscape {
25 namespace LivePathEffect {
27 class LPERoughHatches : public Effect {
28 public:
29     LPERoughHatches(LivePathEffectObject *lpeobject);
30     virtual ~LPERoughHatches();
32     virtual Geom::Piecewise<Geom::D2<Geom::SBasis> >
33     doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
35     virtual void resetDefaults(SPItem * item);
37     virtual void doBeforeEffect(SPLPEItem * item);
39   std::vector<double>
40     generateLevels(Geom::Interval const &domain, double x_org);
42   std::vector<std::vector<Geom::Point> >
43     linearSnake(Geom::Piecewise<Geom::D2<Geom::SBasis> > const &f, Geom::Point const &org);
45   Geom::Piecewise<Geom::D2<Geom::SBasis> > 
46   smoothSnake(std::vector<std::vector<Geom::Point> > const &linearSnake);
47     
48 private:
49   double hatch_dist;
50   RandomParam dist_rdm;
51   ScalarParam growth;
52   //topfront,topback,bottomfront,bottomback handle scales.
53   ScalarParam scale_tf, scale_tb, scale_bf, scale_bb;
55   RandomParam top_edge_variation;
56   RandomParam bot_edge_variation;
57   RandomParam top_tgt_variation;
58   RandomParam bot_tgt_variation;
59   RandomParam top_smth_variation;
60   RandomParam bot_smth_variation;
62   BoolParam fat_output, do_bend;
63   ScalarParam stroke_width_top;
64   ScalarParam stroke_width_bot;
65   ScalarParam front_thickness, back_thickness;
67   //PointParam  bender;
68   VectorParam direction;
69   VectorParam bender;
71   LPERoughHatches(const LPERoughHatches&);
72   LPERoughHatches& operator=(const LPERoughHatches&);
73 };
75 } //namespace LivePathEffect
76 } //namespace Inkscape
78 #endif