~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/live_effects/lpe-perspective_path.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 * @brief LPE perspective path effect implementation
 
3
 */
 
4
/* Authors:
 
5
 *   Maximilian Albert <maximilian.albert@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_PERSPECTIVE_PATH_H
 
14
#define INKSCAPE_LPE_PERSPECTIVE_PATH_H
 
15
 
 
16
#include "live_effects/effect.h"
 
17
#include "live_effects/parameter/parameter.h"
 
18
#include "live_effects/parameter/bool.h"
 
19
#include "live_effects/lpegroupbbox.h"
 
20
 
 
21
#include <vector>
 
22
#include "2geom/point.h"
 
23
 
 
24
namespace Inkscape {
 
25
namespace LivePathEffect {
 
26
 
 
27
namespace PP {
 
28
  // we need a separate namespace to avoid clashes with other LPEs
 
29
  class KnotHolderEntityOffset;
 
30
}
 
31
 
 
32
class LPEPerspectivePath : public Effect, GroupBBoxEffect {
 
33
public:
 
34
    LPEPerspectivePath(LivePathEffectObject *lpeobject);
 
35
    virtual ~LPEPerspectivePath();
 
36
    
 
37
    virtual void doBeforeEffect (SPLPEItem *lpeitem);
 
38
 
 
39
    virtual Geom::Piecewise<Geom::D2<Geom::SBasis> > doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in);
 
40
 
 
41
    /* the knotholder entity classes must be declared friends */
 
42
    friend class PP::KnotHolderEntityOffset;
 
43
 
 
44
private:
 
45
    // add the parameters for your effect here:
 
46
    ScalarParam scalex;
 
47
    ScalarParam scaley;
 
48
    // TODO: rewrite this using a PointParam instead of two ScalarParams
 
49
    ScalarParam offsetx;
 
50
    ScalarParam offsety;
 
51
    BoolParam uses_plane_xy;
 
52
    // there are all kinds of parameters. Check the /live_effects/parameter directory which types exist!
 
53
 
 
54
    Geom::Point orig;
 
55
 
 
56
    LPEPerspectivePath(const LPEPerspectivePath&);
 
57
    LPEPerspectivePath& operator=(const LPEPerspectivePath&);
 
58
 
 
59
    std::vector<Geom::Point> handles;
 
60
    double tmat[3][4];
 
61
};
 
62
 
 
63
} //namespace LivePathEffect
 
64
} //namespace Inkscape
 
65
 
 
66
#endif
 
67
 
 
68
/*
 
69
  Local Variables:
 
70
  mode:c++
 
71
  c-file-style:"stroustrup"
 
72
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
73
  indent-tabs-mode:nil
 
74
  fill-column:99
 
75
  End:
 
76
*/
 
77
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :