~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/2geom/bezier-curve.h

  • Committer: Ted Gould
  • Date: 2008-11-21 05:24:08 UTC
  • Revision ID: ted@canonical.com-20081121052408-tilucis2pjrrpzxx
MergeĀ fromĀ fe-moved

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
  void setPoint(unsigned ix, Point v) { inner[X].setPoint(ix, v[X]); inner[Y].setPoint(ix, v[Y]); }
105
105
  Point const operator[](unsigned ix) const { return Point(inner[X][ix], inner[Y][ix]); }
106
106
 
107
 
  Rect boundsFast() const { return bounds_fast(inner); }
108
 
  Rect boundsExact() const { return bounds_exact(inner); }
109
 
  Rect boundsLocal(Interval i, unsigned deg) const {
110
 
      if(i.min() == 0 && i.max() == 1) return boundsFast();
 
107
  virtual OptRect boundsFast() const { return bounds_fast(inner); }
 
108
  virtual OptRect boundsExact() const { return bounds_exact(inner); }
 
109
  virtual OptRect boundsLocal(OptInterval i, unsigned deg) const {
 
110
      if (!i) return OptRect();
 
111
      if(i->min() == 0 && i->max() == 1) return boundsFast();
111
112
      if(deg == 0) return bounds_local(inner, i);
112
113
      // TODO: UUUUUUGGGLLY
113
 
      if(deg == 1 && order > 1) return Rect(bounds_local(Geom::derivative(inner[X]), i),
114
 
                                            bounds_local(Geom::derivative(inner[Y]), i));
115
 
      return Rect(Interval(0,0), Interval(0,0));
 
114
      if(deg == 1 && order > 1) return OptRect(bounds_local(Geom::derivative(inner[X]), i),
 
115
                                               bounds_local(Geom::derivative(inner[Y]), i));
 
116
      return OptRect();
116
117
  }
117
118
//TODO: local
118
119