mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-21 10:10:49 +01:00
Compare commits
3 Commits
9538d15d79
...
aea8402016
Author | SHA1 | Date | |
---|---|---|---|
aea8402016 | |||
7a53fb8e01 | |||
f952e02535 |
@ -1,4 +1,4 @@
|
|||||||
version: 12.1.{build}
|
version: 12.2.{build}
|
||||||
|
|
||||||
configuration:
|
configuration:
|
||||||
- Release
|
- Release
|
||||||
|
@ -3,7 +3,7 @@ unix:!macx:!android {
|
|||||||
} else {
|
} else {
|
||||||
TARGET = GPXSee
|
TARGET = GPXSee
|
||||||
}
|
}
|
||||||
VERSION = 12.1
|
VERSION = 12.2
|
||||||
|
|
||||||
QT += core \
|
QT += core \
|
||||||
gui \
|
gui \
|
||||||
|
@ -37,7 +37,7 @@ Unicode true
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "12.1"
|
!define VERSION "12.2"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
#include <QSurfaceFormat>
|
#include <QSurfaceFormat>
|
||||||
|
#include <QImageReader>
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QJniObject>
|
#include <QJniObject>
|
||||||
@ -59,6 +60,9 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
|||||||
fmt.setStencilBufferSize(8);
|
fmt.setStencilBufferSize(8);
|
||||||
fmt.setSamples(4);
|
fmt.setSamples(4);
|
||||||
QSurfaceFormat::setDefaultFormat(fmt);
|
QSurfaceFormat::setDefaultFormat(fmt);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
QImageReader::setAllocationLimit(0);
|
||||||
|
#endif // QT6
|
||||||
|
|
||||||
loadDatums();
|
loadDatums();
|
||||||
loadPCSs();
|
loadPCSs();
|
||||||
|
@ -11,26 +11,17 @@ void Image::draw(QPainter *painter, const QRectF &rect, Map::Flags flags)
|
|||||||
|
|
||||||
/* When OpenGL is used, big images are rendered incredibly slow or not at
|
/* When OpenGL is used, big images are rendered incredibly slow or not at
|
||||||
all using the QPainter::drawImage() function with a source rect set. So
|
all using the QPainter::drawImage() function with a source rect set. So
|
||||||
we have to tile the image ourself before it can be drawn.
|
we have to tile the image ourself before it can be drawn. */
|
||||||
|
|
||||||
We have to use a list of dynamically allocated pixmaps as QPainter
|
|
||||||
rendering is broken in yet another way with OpenGL and drawPixmap() does
|
|
||||||
access already deleted image instances when reusing a single pixmap. */
|
|
||||||
if (flags & Map::OpenGL) {
|
if (flags & Map::OpenGL) {
|
||||||
QList<QPixmap *> list;
|
|
||||||
|
|
||||||
for (int i = sr.left()/TILE_SIZE; i <= sr.right()/TILE_SIZE; i++) {
|
for (int i = sr.left()/TILE_SIZE; i <= sr.right()/TILE_SIZE; i++) {
|
||||||
for (int j = sr.top()/TILE_SIZE; j <= sr.bottom()/TILE_SIZE; j++) {
|
for (int j = sr.top()/TILE_SIZE; j <= sr.bottom()/TILE_SIZE; j++) {
|
||||||
QPoint tl(i * TILE_SIZE, j * TILE_SIZE);
|
QPoint tl(i * TILE_SIZE, j * TILE_SIZE);
|
||||||
QRect tile(tl, QSize(TILE_SIZE, TILE_SIZE));
|
QRect tile(tl, QSize(TILE_SIZE, TILE_SIZE));
|
||||||
QPixmap *pm = new QPixmap(QPixmap::fromImage(_img.copy(tile)));
|
QPixmap pm(QPixmap::fromImage(_img.copy(tile)));
|
||||||
list.append(pm);
|
pm.setDevicePixelRatio(ratio);
|
||||||
pm->setDevicePixelRatio(ratio);
|
painter->drawPixmap(tl/ratio, pm);
|
||||||
painter->drawPixmap(tl/ratio, *pm);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qDeleteAll(list);
|
|
||||||
} else
|
} else
|
||||||
painter->drawImage(rect.topLeft(), _img, sr);
|
painter->drawImage(rect.topLeft(), _img, sr);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user