Searched defs:std (Results 1 - 10 of 10) sorted by relevance

/inkscape/src/util/
H A Dunordered-containers.h26 # define INK_UNORDERED_SET std::unordered_set
27 # define INK_UNORDERED_MAP std::unordered_map
28 # define INK_HASH std::hash
30 namespace std { namespace
32 struct hash<Glib::ustring> : public std::unary_function<Glib::ustring, std::size_t> {
33 std::size_t operator()(Glib::ustring const &s) const {
34 return hash<std::string>()(s.raw());
37 } // namespace std
42 # define INK_UNORDERED_SET std
[all...]
/inkscape/src/libavoid/
H A Dgeomtypes.cpp76 // Just defined to allow std::set<Point>. Not particularly meaningful!
121 ps[i] = std::make_pair(polyPtr, poly.ps[i].vn);
178 progressiveMinX = std::min(progressiveMinX, at(i).x);
179 progressiveMinY = std::min(progressiveMinY, at(i).y);
180 progressiveMaxX = std::max(progressiveMaxX, at(i).x);
181 progressiveMaxY = std::max(progressiveMaxY, at(i).y);
392 std::vector<Point>::iterator it = simplified.ps.begin();
518 double xMin = std::min(topLeft.x, bottomRight.x);
519 double xMax = std::max(topLeft.x, bottomRight.x);
520 double yMin = std
159 COLA_ASSERT(index < size()); const Polygon& poly = *(ps[index].first); unsigned short poly_index = ps[index].second; COLA_ASSERT(poly_index < poly.size()); return poly.ps[poly_index]; } void PolygonInterface::getBoundingRect(double *minX, double *minY, double *maxX, double *maxY) const { double progressiveMinX = DBL_MAX; double progressiveMinY = DBL_MAX; double progressiveMaxX = -DBL_MAX; double progressiveMaxY = -DBL_MAX; for (size_t i = 0; i < size(); ++i) { progressiveMinX = std::min(progressiveMinX, at(i).x); progressiveMinY = std::min(progressiveMinY, at(i).y); progressiveMaxX = std::max(progressiveMaxX, at(i).x); progressiveMaxY = std::max(progressiveMaxY, at(i).y); } if (minX) { *minX = progressiveMinX; } if (maxX) { *maxX = progressiveMaxX; } if (minY) { *minY = progressiveMinY; } if (maxY) { *maxY = progressiveMaxY; } } Polygon::Polygon() : PolygonInterface() { clear(); } Polygon::Polygon(const int pn) : PolygonInterface(), ps(pn) { } Polygon::Polygon(const PolygonInterface& poly) : PolygonInterface(), _id(poly.id()), ps(poly.size()) { for (size_t i = 0; i < poly.size(); ++i) { ps[i] = poly.at(i); } } void Polygon::clear(void) { ps.clear(); ts.clear(); } bool Polygon::empty(void) const { return ps.empty(); } size_t Polygon::size(void) const { return ps.size(); } int Polygon::id(void) const { return _id; } const Point& Polygon::at(size_t index) const { COLA_ASSERT(index < size()); return ps[index]; } static const unsigned int SHORTEN_NONE = 0; static const unsigned int SHORTEN_START = 1; static const unsigned int SHORTEN_END = 2; static const unsigned int SHORTEN_BOTH = SHORTEN_START | SHORTEN_END; static void shorten_line(double& x1, double& y1, double& x2, double& y2, const unsigned int mode, const double shorten_length) { if (mode == SHORTEN_NONE) { return; } double rise = y1 - y2; double run = x1 - x2; double disty = fabs(rise); double distx = fabs(run); if ((mode == SHORTEN_BOTH) && (((distx > disty) && ((shorten_length * 2) > distx)) || ((disty >= distx) && ((shorten_length * 2) > disty)))) { x1 = x2 = x1 - (run / 2); y1 = y2 = y1 - (rise / 2); return; } else if ((mode == SHORTEN_START) && (((distx > disty) argument
[all...]
H A Dorthogonal.cpp205 typedef std::list<ShiftSegment> ShiftSegmentList;
210 typedef std::set<Node*,CmpNodePos> NodeSet;
301 std::min(min[dim], curr->ss->maxSpaceLimit);
316 std::max(max[dim], curr->ss->minSpaceLimit);
338 lastAbovePos = std::min(curr->min[dim], lastAbovePos);
341 lastAbovePos = std::min(curr->max[dim], lastAbovePos);
343 lastBelowPos = std::max(curr->max[dim], lastBelowPos);
356 firstAbovePos = std::max(curr->max[dim], firstAbovePos);
367 lastBelowPos = std::max(curr->max[dim], lastBelowPos);
370 lastBelowPos = std
619 COLA_ASSERT(begin < finish); if (bvi) { vertInfs.insert(bvi); } if (fvi) { vertInfs.insert(fvi); } } LineSegment(const double& bf, const double& p, VertInf *bfvi = NULL) : begin(bf), finish(bf), pos(p), shapeSide(false) { if (bfvi) { vertInfs.insert(bfvi); } } bool operator<(const LineSegment& rhs) const { if (begin != rhs.begin) { return begin < rhs.begin; } if (pos != rhs.pos) { return pos < rhs.pos; } if (finish != rhs.finish) { return finish < rhs.finish; } COLA_ASSERT(shapeSide == rhs.shapeSide); return false; } bool overlaps(const LineSegment& rhs) const { if ((begin == rhs.begin) && (pos == rhs.pos) && (finish == rhs.finish)) { return true; } if (pos == rhs.pos) { if (((begin >= rhs.begin) && (begin <= rhs.finish)) || ((rhs.begin >= begin) && (rhs.begin <= finish)) ) { return true; } } return false; } void mergeVertInfs(const LineSegment& segment) { begin = std::min(begin, segment.begin); finish = std::max(finish, segment.finish); vertInfs.insert(segment.vertInfs.begin(), segment.vertInfs.end()); } VertInf *beginVertInf(void) const { if (vertInfs.empty()) { return NULL; } return *vertInfs.begin(); } VertInf *finishVertInf(void) const { if (vertInfs.empty()) { return NULL; } return *vertInfs.rbegin(); } VertInf *commitPositionX(Router *router, double posX) { VertInf *found = NULL; for (VertSet::iterator v = vertInfs.begin(); v != vertInfs.end(); ++v) { if ((*v)->point.x == posX) { found = *v; break; } } if (!found) { found = new VertInf(router, dummyOrthogID, Point(posX, pos)); vertInfs.insert(found); } return found; } void commitBegin(Router *router, VertInf *vert = NULL) { if (vert) { vertInfs.insert(vert); } if (vertInfs.empty() || ((*vertInfs.begin())->point.x != begin)) { vertInfs.insert(new VertInf(router, dummyOrthogID, Point(begin, pos))); } } void commitFinish(Router *router, VertInf *vert = NULL) { if (vert) { vertInfs.insert(vert); } if (vertInfs.empty() || ((*vertInfs.rbegin())->point.x != finish)) { vertInfs.insert(new VertInf(router, dummyOrthogID, Point(finish, pos))); } } VertSet::iterator addSegmentsUpTo(Router * , double finishPos) { VertSet::iterator firstIntersectionPt = vertInfs.end(); for (VertSet::iterator vert = vertInfs.begin(); vert != vertInfs.end(); ++vert) { if ((*vert)->point.x > finishPos) argument
[all...]
/inkscape/src/2geom/
H A Drecursive-bezier-intersection.cpp15 using std::vector;
21 std::vector<Geom::Point> p;
35 std::swap(minax, maxax);
46 std::swap(minay, maxay);
59 find_intersections_bezier_recursive(std::vector<std::pair<double, double> > & xs,
64 find_intersections_bezier_recursive( std::vector<std::pair<double, double> > &xs, argument
83 std::vector< std
449 find_intersections_bezier_recursive( std::vector<std::pair<double, double> > &xs, OldBezier a, OldBezier b) argument
[all...]
H A Dangle.h144 d = std::fmod(d, 360.0);
155 _angle = std::fmod(_angle, 2*M_PI);
276 using std::swap;
393 namespace std { namespace
H A Dbasic-intersection.cpp45 using std::vector;
50 // void find_intersections(std::vector<std::pair<double, double> > &xs,
61 // void find_intersections(std::vector< std::pair<double, double> > & xs,
62 // std::vector<Point> const& A,
63 // std::vector<Point> const& B,
71 void portion(std::vector<Point> &B, Interval const &I);
72 void derivative(std::vector<Point> &D, std
95 find_intersections(std::vector< std::pair<double, double> > & xs, std::vector<Point> const& A, std::vector<Point> const& B, double precision) argument
202 subdivide(D2<Bezier> const &a, D2<Bezier> const &b, std::vector< std::pair<double, double> > const &xs, std::vector< D2<Bezier> > &av, std::vector< D2<Bezier> > &bv) argument
[all...]
H A Dpoint.h238 //template <Dim2 DIM, typename First = std::less<Coord>, typename Second = std::less<Coord> > LexOrder;
252 //template <typename First = std::less<Coord>, typename Second = std::less<Coord> > LexOrder
258 std::ostream &operator<<(std::ostream &out, const Geom::Point &p);
261 typedef std::less<Coord> Primary;
262 typedef std::less<Coord> Secondary;
263 typedef std::less<Coord> XOrder;
264 typedef std
417 namespace std { namespace
[all...]
H A Dbezier-clipping.cpp52 using std::swap;
67 void print(std::vector<Point> const& cp, const char* msg = "")
69 std::cerr << msg << std::endl;
71 std::cerr << i << " : " << cp[i] << std::endl;
75 std::basic_ostream<charT> &
76 operator<< (std::basic_ostream<charT> & os, const Interval & I)
82 double angle (std::vector<Point> const& A)
85 double a = std
1073 get_solutions(std::vector< std::pair<double, double> >& xs, std::vector<Point> const& A, std::vector<Point> const& B, double precision) argument
1117 find_collinear_normal(std::vector< std::pair<double, double> >& xs, std::vector<Point> const& A, std::vector<Point> const& B, double precision) argument
1139 find_intersections_bezier_clipping(std::vector< std::pair<double, double> >& xs, std::vector<Point> const& A, std::vector<Point> const& B, double precision) argument
[all...]
/inkscape/src/svg/
H A Dpath-string.h45 std::string const &string() {
46 std::string const &t = tail();
50 // std::cout << " final: " << final << std::endl;
54 operator std::string const &() {
222 std::string str;
238 std::string commonbase;
239 std::string final;
240 std::string const &tail() const {
/inkscape/src/ui/tool/
H A Dpath-manipulator.cpp301 add_or_replace_if_extremum(std::vector< std::pair<NodeList::iterator, double> > &vec, argument
307 vec.push_back( std::pair<NodeList::iterator, double>( node, t ) );
311 vec.push_back( std::pair<NodeList::iterator, double>( node, t ) );
325 std::vector< std::pair<NodeList::iterator, double> > extremum_vector;
341 std::vector<double> rs = deriv1d.roots();
342 for (std::vector<double>::iterator it = rs.begin(); it != rs.end(); ++it) {
352 if ( !Geom::are_near(t - std::floor(t+0.5),0.) ) // std
[all...]

Completed in 35 milliseconds