1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 15:23:22 +02:00
GPXSee/src/data/path.cpp

24 lines
398 B
C++
Raw Normal View History

2016-11-14 22:12:43 +01:00
#include "path.h"
RectC Path::boundingRect() const
{
2017-12-01 22:24:04 +01:00
RectC ret;
if (size() < 2)
2017-12-01 22:24:04 +01:00
return ret;
2017-12-01 22:24:04 +01:00
for (int i = 0; i < size(); i++)
ret.unite(at(i).coordinates());
return ret;
}
#ifndef QT_NO_DEBUG
2016-11-14 22:12:43 +01:00
QDebug operator<<(QDebug dbg, const PathPoint &point)
{
dbg.nospace() << "PathPoint(" << point.distance() << ", "
<< point.coordinates() << ")";
2017-08-15 15:13:34 +02:00
return dbg.space();
2016-11-14 22:12:43 +01:00
}
#endif // QT_NO_DEBUG