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