/inkscape/src/2geom/ |
H A D | coord.cpp | 33 // Most of the code in this file is derived from: 50 // from this software without specific prior written permission. 122 Vector<T> SubVector(int from, int to) { argument 124 ASSERT(from < to); 125 ASSERT(0 <= from); 126 return Vector<T>(start() + from, to - from); 593 int from, 596 for (int i = from; i < from [all...] |
H A D | path.cpp | 60 PathInterval::PathInterval(PathTime const &from, PathTime const &to, bool cross_start, size_type path_size) argument 61 : _from(from) 65 , _reverse(cross_start ? to >= from : to < from) 121 // If there is some node further than min_dist (in time coord) from the ends, 206 PathInterval PathInterval::from_direction(PathTime const &from, PathTime const &to, bool reversed, size_type path_size) 209 result._from = from; 231 result._cross_start = from < to; 233 result._cross_start = to < from; 621 std::vector<double> Path::allNearestTimes(Point const &_point, double from, doubl [all...] |
H A D | crossing.cpp | 15 double wrap_dist(double from, double to, double size, bool rev) { argument 17 if(to > from) { 18 return from + (size - to); 20 return from - to; 23 if(to < from) { 24 return to + (size - from); 26 return to - from; 80 // list of sets of edges, each set corresponding to those emanating from the path 187 // the linesegment with each of the polygon's linesegments extending from the cusp node (i.e. two intersections)
|
H A D | curve.cpp | 52 std::vector<Coord> Curve::allNearestTimes(Point const& p, Coord from, Coord to) const argument 54 return all_nearest_times(p, toSBasis(), from, to);
|
H A D | nearest-time.cpp | 40 Coord nearest_time(Point const &p, D2<Bezier> const &input, Coord from, Coord to) argument 42 Interval domain(from, to); 46 THROW_RANGEERROR("[from,to] interval out of bounds"); 49 if (input.isConstant(0)) return from; 98 * related to the interval [from, to], to the point "p". 106 double from, double to ) 108 if ( from > to ) std::swap(from, to); 109 if ( from < 0 || to > 1 ) 111 THROW_RANGEERROR("[from,t 103 nearest_time(Point const& p, D2<SBasis> const& c, D2<SBasis> const& dc, double from, double to ) argument 142 all_nearest_times(Point const &p, D2<SBasis> const &c, D2<SBasis> const &dc, double from, double to) argument 192 nearest_time(Point const &p, Piecewise< D2<SBasis> > const &c, double from, double to) argument 242 all_nearest_times(Point const &p, Piecewise< D2<SBasis> > const &c, double from, double to) argument [all...] |
H A D | bezier-curve.cpp | 157 // in case we encounter an order-1 curve created from a vector 220 Coord BezierCurve::nearestTime(Point const &p, Coord from, Coord to) const argument 222 return nearest_time(p, inner, from, to); 281 Coord BezierCurveN<1>::nearestTime(Point const& p, Coord from, Coord to) const argument 285 if ( from > to ) swap(from, to); 286 Point ip = pointAt(from); 292 if ( t <= 0 ) return from; 294 else return from + t*(to-from); [all...] |
H A D | bezier.cpp | 232 Bezier portion(Bezier const &a, double from, double to) argument 237 if (from > to) { 238 std::swap(from, to); 243 if (from == 0) { 250 casteljau_subdivision<double>(from, &ret.c_[0], NULL, &ret.c_[0], ret.order()); 252 casteljau_subdivision<double>((to - from) / (1 - from), &ret.c_[0], &ret.c_[0], NULL, ret.order()); 254 // the last coefficient to a value evaluated directly from the original polynomial
|
H A D | piecewise.h | 77 //segs[i] stretches from cuts[i] to cuts[i+1]. 341 * Returns a portion of a piece of a Piecewise<T>, given the piece's index and a to/from time. 345 T elem_portion(const Piecewise<T> &a, unsigned i, double from, double to) { argument 348 return portion( a[i], (from - a.cuts[i]) * rwidth, (to - a.cuts[i]) * rwidth ); 427 * Returns a Piecewise<T> with a defined domain of [min(from, to), max(from, to)]. 431 Piecewise<T> portion(const Piecewise<T> &pw, double from, double to) { 432 if(pw.empty() || from == to) return Piecewise<T>(); 436 double temp = from; 437 from [all...] |
H A D | sbasis.cpp | 41 /** bound the error from term truncation 471 SBasis portion(const SBasis &t, double from, double to) { argument 472 double fv = t.valueAt(from); 474 SBasis ret = compose(t, Linear(from, to)); 552 // change from v to u parameterisation
|
H A D | elliptical-arc.cpp | 67 * to \f$(0,-1)\f$. After the angle is mapped to a point from a unit circle, the point is 85 * from initial to final point. The two flags disambiguate between them: "large arc flag" selects 87 * angles. Angles always increase when going from the +X axis in the direction of the +Y axis, 338 std::vector<double> EllipticalArc::allNearestTimes( Point const& p, double from, double to ) const argument 342 if ( from > to ) std::swap(from, to); 343 if ( from < 0 || to > 1 ) 345 THROW_RANGEERROR("[from,to] interval out of range"); 348 if ( ( are_near(ray(X), 0) && are_near(ray(Y), 0) ) || are_near(from, to) ) 350 result.push_back(from); [all...] |
H A D | path.h | 186 * @param from Initial time 188 * @param cross_start If true, the interval will proceed from the initial to final 193 PathInterval(PathTime const &from, PathTime const &to, bool cross_start, size_type path_size); 200 PathTime const &from() const { return _from; } function in class:Geom::PathInterval 213 /// Get a time at least @a min_dist away in parameter space from the ends. 218 static PathInterval from_direction(PathTime const &from, PathTime const &to, 222 static PathInterval from_start_crossing(PathTime const &from, PathTime const &to, argument 224 PathInterval result(from, to, cross_start, path_size); 239 inline PathInterval forward_interval(PathTime const &from, PathTime const &to, argument 242 PathInterval result = PathInterval::from_direction(from, t 248 backward_interval(PathTime const &from, PathTime const &to, PathInterval::size_type path_size) argument 588 appendPortionTo(Path &p, PathTime const &from, PathTime const &to, bool cross_start = false) const argument 620 portion(PathTime const &from, PathTime const &to, bool cross_start = false) const argument [all...] |
H A D | toposweep.cpp | 231 std::vector<T> deref_vector(std::vector<boost::shared_ptr<T> > const &xs, unsigned from = 0) { 233 ret.reserve(xs.size() - from); 234 for(unsigned i = from; i < xs.size(); i++) 330 Context(boost::shared_ptr<Section> sect, int from) : section(sect), from_vert(from), to_vert(-1) {} argument
|
/inkscape/src/display/ |
H A D | sp-canvas-util.cpp | 52 Geom::Affine sp_canvas_item_i2i_affine (SPCanvasItem * from, SPCanvasItem * to) argument 54 g_assert (from != NULL); 57 return sp_canvas_item_i2w_affine(from) * sp_canvas_item_i2w_affine(to).inverse();
|
H A D | drawing-context.cpp | 104 double from = angle.initialAngle(); local 106 if (to > from) { 107 cairo_arc(_ct, center[X], center[Y], radius, from, to); 109 cairo_arc_negative(_ct, center[X], center[Y], radius, to, from);
|
/inkscape/src/ |
H A D | selection.h | 58 * from the selection. Many actions operate on the selection, so it is 130 * Removes an item from the set of selected objects. 146 * Removes an item from the set of selected objects. 175 /** Add items from an STL iterator range to the selection. 176 * \param from the begin iterator 180 void add(InputIterator from, InputIterator to) { argument 182 while ( from != to ) { 183 _add(*from); 184 ++from; 226 * Returns the smallest item from thi [all...] |
H A D | unclump.cpp | 73 so its radius (distance from center to edge) depends on the w/h and the angle towards the other item. 85 // angle from each item's center to the other's, unsqueezed by its w/h, normalized to 0..pi/2 169 Average unclump_dist from item to others 216 Most distant from item among others 239 Removes from the \a rest list those items that are "behind" \a closest as seen from \a item, 240 i.e. those on the other side of the line through \a closest perpendicular to the direction from \a 282 Moves \a what away from \a from by \a dist 285 unclump_push (SPItem *from, SPIte argument [all...] |
H A D | conn-avoid-ref.cpp | 69 // Deleting the shapeRef will remove it completely from 97 // case can happen if a new document is loaded from the file chooser 134 // Deleting the shapeRef will remove it completely from 289 // create convex hull from all sampled points 334 std::vector<SPItem *> get_avoided_items(std::vector<SPItem *> &list, SPObject *from, SPDesktop *desktop, argument 337 for (SPObject *child = from->firstChild() ; child != NULL; child = child->next ) {
|
H A D | preferences.cpp | 36 static void migrateDetails( Inkscape::XML::Document *from, Inkscape::XML::Document *to ); 40 // TODO clean up. Function copied from file.cpp: 257 static void migrateDetails( Inkscape::XML::Document *from, Inkscape::XML::Document *to ) argument 260 to->root()->mergeFrom(from->root(), "id"); 278 // the filesystem encoding would change things from a one-to-many problem to 280 // from one run of the program to the next, so can not be stored. 383 // argh - purge this Util::List nonsense from XML classes fast 658 * Derived from former inkscape_get_repr(). Private because it assumes that the backend is
|
/inkscape/src/livarot/ |
H A D | AVL.cpp | 12 * the algorithm explanation for this code comes from purists.org, which seems to have disappeared since 53 AVLTree *AVLTree::leaf(AVLTree *from, Side s) argument 55 if (from == child[1 - s]) { 63 else if (from == child[s]) { 72 AVLTree *AVLTree::leafFromParent(AVLTree */*from*/, Side s) 82 AVLTree::RestoreBalances (AVLTree * from, AVLTree * &racine) argument 84 if (from == NULL) 93 if (from == child[LEFT]) 95 if (from == child[RIGHT]) 103 if (from [all...] |
H A D | ShapeMisc.cpp | 34 // more precisely that's extracting an eulerian path from a graph, but here we want to split 907 Path *from = orig[nPath]; local 908 if (nPiece < 0 || nPiece >= int(from->descr_cmd.size())) 916 int nType = from->descr_cmd[nPiece]->getType(); 926 bord = ReFormeLineTo (bord, curBord, dest, from); 930 bord = ReFormeArcTo (bord, curBord, dest, from); 934 bord = ReFormeCubicTo (bord, curBord, dest, from); 939 dynamic_cast<PathDescrBezierTo *>(from->descr_cmd[nPiece]); 943 bord = ReFormeLineTo (bord, curBord, dest, from); 947 bord = ReFormeBezierTo (bord, curBord, dest, from); 1027 ReFormeArcTo(int bord, int , Path * dest, Path * from) argument 1105 ReFormeCubicTo(int bord, int , Path * dest, Path * from) argument 1151 ReFormeBezierTo(int bord, int , Path * dest, Path * from) argument 1394 ReFormeBezierChunk(Geom::Point px, Geom::Point nx, Path * dest, int inBezier, int nbInterm, Path * from, int p, double ts, double te) argument [all...] |
/inkscape/src/extension/internal/filter/ |
H A D | filter.cpp | 71 Filter::merge_filters( Inkscape::XML::Node * to, Inkscape::XML::Node * from, argument 75 if (from == NULL) return; 78 for ( Inkscape::Util::List<Inkscape::XML::AttributeRecord const> iter = from->attributeList() ; 83 to->setAttribute(attr, from->attribute(attr)); 86 if (srcGraphic != NULL && !strcmp(from->attribute(attr), "SourceGraphic")) { 90 if (srcGraphicAlpha != NULL && !strcmp(from->attribute(attr), "SourceAlpha")) { 97 for (Inkscape::XML::Node * from_child = from->firstChild(); 106 if (from_child == from->firstChild() && !strcmp("filter", from->name()) && srcGraphic != NULL && to_child->attribute("in") == NULL) {
|
/inkscape/src/util/ |
H A D | units.cpp | 86 // maps unit codes obtained from their abbreviations to their SVGLength unit indexes 530 double Quantity::convert(double from_dist, Unit const *from, Unit const *to) argument 532 return from->convert(from_dist, to); 534 double Quantity::convert(double from_dist, Glib::ustring const &from, Unit const *to) argument 536 return convert(from_dist, unit_table.getUnit(from.c_str()), to); 538 double Quantity::convert(double from_dist, Unit const *from, Glib::ustring const &to) argument 540 return convert(from_dist, from, unit_table.getUnit(to.c_str())); 542 double Quantity::convert(double from_dist, Glib::ustring const &from, Glib::ustring const &to) argument 544 return convert(from_dist, unit_table.getUnit(from.c_str()), unit_table.getUnit(to.c_str())); 546 double Quantity::convert(double from_dist, char const *from, cha argument [all...] |
/inkscape/src/libnrtype/ |
H A D | Layout-TNG-OutIter.cpp | 75 that. Note that this will collect all clicks from the current UI because 564 void Layout::simulateLayoutUsingKerning(iterator const &from, iterator const &to, OptionalTextTagAttrs *result) const argument 574 if (to._char_index <= from._char_index) 576 result->dx.reserve(to._char_index - from._char_index); 577 result->dy.reserve(to._char_index - from._char_index); 578 result->rotate.reserve(to._char_index - from._char_index); 579 for (unsigned char_index = from._char_index ; char_index < to._char_index ; char_index++) { 618 result->dx.resize(char_index - from._char_index + 1, zero_length); 624 result->dy.resize(char_index - from._char_index + 1, zero_length); 628 result->rotate.resize(char_index - from [all...] |
/inkscape/src/ui/tools/ |
H A D | calligraphic-tool.cpp | 89 static void add_cap(SPCurve *curve, Geom::Point const &from, Geom::Point const &to, double rounding); 281 // 1a. calculate nib angle from input device tilt: 323 // Try to detect a sudden flip when the new angle differs too much from the previous for the 520 // distance from pointer to nearest 582 || (this->hatch_spacing > 0 && hatch_dist > 50 * this->hatch_spacing) // went too far from the guide 971 Geom::Point const &from, 975 if (Geom::L2( to - from ) > DYNA_EPSILON) { 976 Geom::Point vel = rounding * Geom::rot90( to - from ) / sqrt(2.0); 979 Geom::Point v = mag * Geom::rot90( to - from ) / Geom::L2( to - from ); 970 add_cap(SPCurve *curve, Geom::Point const &from, Geom::Point const &to, double rounding) argument [all...] |
H A D | eraser-tool.cpp | 229 // 1a. calculate nib angle from input device tilt: 271 // Try to detect a sudden flip when the new angle differs too much from the previous for the 805 Geom::Point const &pre, Geom::Point const &from, 809 Geom::Point vel = rounding * Geom::rot90( to - from ) / sqrt(2.0); 812 Geom::Point v_in = from - pre; 831 curve->curveto(from + v_in, to + v_out, to); 804 add_cap(SPCurve *curve, Geom::Point const &pre, Geom::Point const &from, Geom::Point const &to, Geom::Point const &post, double rounding) argument
|