Add setScale to the API

This commit is contained in:
GriffinR
2022-11-03 13:19:57 -04:00
parent 936ac56a7f
commit 3770efd6c5
6 changed files with 37 additions and 1 deletions

View File

@@ -179,6 +179,18 @@ void MapView::setVerticalScale(qreal scale) {
this->scene()->update();
}
void MapView::setScale(qreal hScale, qreal vScale, int layer) {
this->getOverlay(layer)->setScale(hScale, vScale);
this->scene()->update();
}
// Overload. No layer provided, set scale of all layers
void MapView::setScale(qreal hScale, qreal vScale) {
foreach (Overlay * layer, this->overlayMap)
layer->setScale(hScale, vScale);
this->scene()->update();
}
int MapView::getRotation(int layer) {
return this->getOverlay(layer)->getRotation();
}