summaryrefslogtreecommitdiff
path: root/src/location/quickmapitems/qgeomapitemgeometry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/quickmapitems/qgeomapitemgeometry.cpp')
-rw-r--r--src/location/quickmapitems/qgeomapitemgeometry.cpp69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/location/quickmapitems/qgeomapitemgeometry.cpp b/src/location/quickmapitems/qgeomapitemgeometry.cpp
index dda09601..a74fa5de 100644
--- a/src/location/quickmapitems/qgeomapitemgeometry.cpp
+++ b/src/location/quickmapitems/qgeomapitemgeometry.cpp
@@ -21,73 +21,4 @@ QGeoMapItemGeometry::~QGeoMapItemGeometry()
}
-#ifndef MAPITEMS_USE_SHAPES
-/*!
- \internal
-*/
-void QGeoMapItemGeometry::translate(const QPointF &offset)
-{
- for (qsizetype i = 0; i < screenVertices_.size(); ++i)
- screenVertices_[i] += offset;
-
- firstPointOffset_ += offset;
- screenOutline_.translate(offset);
- screenBounds_.translate(offset);
-}
-
-/*!
- \internal
-*/
-void QGeoMapItemGeometry::allocateAndFill(QSGGeometry *geom) const
-{
- const QList<QPointF> &vx = screenVertices_;
- const QList<quint32> &ix = screenIndices_;
-
- if (isIndexed()) {
- geom->allocate(vx.size(), ix.size());
- if (geom->indexType() == QSGGeometry::UnsignedShortType) {
- quint16 *its = geom->indexDataAsUShort();
- for (qsizetype i = 0; i < ix.size(); ++i)
- its[i] = ix[i];
- } else if (geom->indexType() == QSGGeometry::UnsignedIntType) {
- quint32 *its = geom->indexDataAsUInt();
- for (qsizetype i = 0; i < ix.size(); ++i)
- its[i] = ix[i];
- }
- } else {
- geom->allocate(vx.size());
- }
-
- QSGGeometry::Point2D *pts = geom->vertexDataAsPoint2D();
- for (qsizetype i = 0; i < vx.size(); ++i)
- pts[i].set(vx[i].x(), vx[i].y());
-}
-
-/*!
- \internal
-*/
-QRectF QGeoMapItemGeometry::translateToCommonOrigin(const QList<QGeoMapItemGeometry *> &geoms)
-{
- QGeoCoordinate origin = geoms.at(0)->origin();
-
- QPainterPath brects;
-
- // first get max offset
- QPointF maxOffset = geoms.at(0)->firstPointOffset();
- for (const QGeoMapItemGeometry *g : geoms) {
- QPointF o = g->firstPointOffset();
- maxOffset.setX(qMax(o.x(), maxOffset.x()));
- maxOffset.setY(qMax(o.y(), maxOffset.y()));
- }
-
- // then translate everything
- for (QGeoMapItemGeometry *g : geoms) {
- g->translate(maxOffset - g->firstPointOffset());
- brects.addRect(g->sourceBoundingBox());
- }
-
- return brects.boundingRect();
-}
-#endif
-
QT_END_NAMESPACE