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

« back to all changes in this revision

Viewing changes to src/livarot/path-description.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Kees Cook, Ted Gould
  • Date: 2008-02-10 14:20:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080210142016-vcnb2zqyhszu0xvb
Tags: 0.46~pre1-0ubuntu1
[ Kees Cook ]
* debian/control:
  - add libgtkspell-dev build-dep to gain GtkSpell features (LP: #183547).
  - update Standards version (no changes needed).
  - add Vcs and Homepage fields.
  - switch to new python-lxml dep.
* debian/{control,rules}: switch from dpatch to quilt for more sanity.
* debian/patches/20_fix_glib_and_gxx43_ftbfs.patch:
  - merged against upstream fixes.
  - added additional fixes for newly written code.
* debian/rules: enable parallel building.

[ Ted Gould ]
* Updating POTFILES.in to make it so things build correctly.
* debian/control:
  - add ImageMagick++ and libboost-dev to build-deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  descr_interm_bezier = 6,  // control point of the bezier spline
20
20
  descr_forced = 7,
21
21
 
22
 
  descr_type_mask = 15      // the command no will be stored in a "flags" field, potentially with other info, so we need 
 
22
  descr_type_mask = 15      // the command no will be stored in a "flags" field, potentially with other info, so we need
23
23
                            // a mask to AND the field and extract the command
24
24
};
25
25
 
34
34
    flags &= ~descr_type_mask;
35
35
    flags |= t;
36
36
  }
37
 
  
38
 
  virtual void dumpSVG(Inkscape::SVGOStringStream &s, NR::Point const &last) const {}
39
 
  virtual PathDescr *clone() const = 0;
40
 
  virtual void transform(NR::Matrix const &t) {}
41
 
  virtual void dump(std::ostream &s) const {}
42
 
  
 
37
 
 
38
    virtual void dumpSVG(Inkscape::SVGOStringStream &/*s*/, NR::Point const &/*last*/) const {}
 
39
    virtual PathDescr *clone() const = 0;
 
40
    virtual void transform(NR::Matrix const &/*t*/) {}
 
41
    virtual void dump(std::ostream &/*s*/) const {}
 
42
 
43
43
  int    flags;         // most notably contains the path command no
44
 
  int    associated;            // index in the polyline of the point that ends the path portion of this command
 
44
  int    associated;    // index in the polyline of the point that ends the path portion of this command
45
45
  double tSt;
46
46
  double tEn;
47
47
};
50
50
{
51
51
  PathDescrMoveTo(NR::Point const &pp)
52
52
      : PathDescr(descr_moveto), p(pp) {}
53
 
  
 
53
 
54
54
  void dumpSVG(Inkscape::SVGOStringStream &s, NR::Point const &last) const;
55
55
  PathDescr *clone() const;
56
56
  void transform(NR::Matrix const &t);
63
63
{
64
64
  PathDescrLineTo(NR::Point const &pp)
65
65
    : PathDescr(descr_lineto), p(pp) {}
66
 
  
 
66
 
67
67
  void dumpSVG(Inkscape::SVGOStringStream &s, NR::Point const &last) const;
68
68
  PathDescr *clone() const;
69
69
  void transform(NR::Matrix const &t);
70
70
  void dump(std::ostream &s) const;
71
 
  
 
71
 
72
72
  NR::Point p;
73
73
};
74
74
 
77
77
{
78
78
  PathDescrBezierTo(NR::Point const &pp, int n)
79
79
    : PathDescr(descr_bezierto), p(pp), nb(n) {}
80
 
  
 
80
 
81
81
  PathDescr *clone() const;
82
82
  void transform(NR::Matrix const &t);
83
83
  void dump(std::ostream &s) const;
84
 
  
85
 
  NR::Point p;        // the endpoint's coordinates
 
84
 
 
85
  NR::Point p;        // the endpoint's coordinates
86
86
  int nb;             // number of control points, stored in the next path description commands
87
87
};
88
88
 
97
97
  PathDescr *clone() const;
98
98
  void transform(NR::Matrix const &t);
99
99
  void dump(std::ostream &s) const;
100
 
  
101
 
  NR::Point p;                  // control point coordinates
 
100
 
 
101
  NR::Point p;                  // control point coordinates
102
102
};
103
103
 
104
104
// cubic spline curve: 2 tangents and one endpoint
106
106
{
107
107
  PathDescrCubicTo(NR::Point const &pp, NR::Point const &s, NR::Point const& e)
108
108
    : PathDescr(descr_cubicto), p(pp), start(s), end(e) {}
109
 
  
 
109
 
110
110
  void dumpSVG(Inkscape::SVGOStringStream &s, NR::Point const &last) const;
111
111
  PathDescr *clone() const;
112
112
  void transform(NR::Matrix const &t);
113
113
  void dump(std::ostream &s) const;
114
 
  
 
114
 
115
115
  NR::Point p;
116
116
  NR::Point start;
117
117
  NR::Point end;
122
122
{
123
123
  PathDescrArcTo(NR::Point const &pp, double x, double y, double a, bool l, bool c)
124
124
    : PathDescr(descr_arcto), p(pp), rx(x), ry(y), angle(a), large(l), clockwise(c) {}
125
 
  
 
125
 
126
126
  void dumpSVG(Inkscape::SVGOStringStream &s, NR::Point const &last) const;
127
127
  PathDescr *clone() const;
128
128
  void transform(NR::Matrix const &t);
129
129
  void dump(std::ostream &s) const;
130
 
  
 
130
 
131
131
  NR::Point p;
132
132
  double rx;
133
133
  double ry;
139
139
struct PathDescrForced : public PathDescr
140
140
{
141
141
  PathDescrForced() : PathDescr(descr_forced), p(0, 0) {}
142
 
  
 
142
 
143
143
  PathDescr *clone() const;
144
 
  
 
144
 
145
145
  /* FIXME: not sure whether _forced should have a point associated with it;
146
146
  ** Path::ConvertForcedToMoveTo suggests that maybe it should.
147
147
  */
151
151
struct PathDescrClose : public PathDescr
152
152
{
153
153
  PathDescrClose() : PathDescr(descr_close) {}
154
 
  
 
154
 
155
155
  void dumpSVG(Inkscape::SVGOStringStream &s, NR::Point const &last) const;
156
156
  PathDescr *clone() const;
157
 
  
 
157
 
158
158
  /* FIXME: not sure whether _forced should have a point associated with it;
159
159
  ** Path::ConvertForcedToMoveTo suggests that maybe it should.
160
160
  */
163
163
 
164
164
#endif
165
165
 
 
166
 
 
167
/*
 
168
  Local Variables:
 
169
  mode:c++
 
170
  c-file-style:"stroustrup"
 
171
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
172
  indent-tabs-mode:nil
 
173
  fill-column:99
 
174
  End:
 
175
*/
 
176
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :