mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-23 19:25:55 +01:00
Added HiDPI and Overzoom sections
This commit is contained in:
parent
6e1bc09d62
commit
98933deb0e
@ -25,6 +25,11 @@ to the functions:
|
|||||||
QPixmap pm;
|
QPixmap pm;
|
||||||
pm.loadFromData(tileData, QByteArray::number(zoom));
|
pm.loadFromData(tileData, QByteArray::number(zoom));
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For a complete code sample see the [pbf2png](https://github.com/tumic0/pbf2png)
|
||||||
|
conversion utility.
|
||||||
|
|
||||||
|
### HiDPI
|
||||||
The plugin supports vector scaling using QImageReader's setScaledSize() method,
|
The plugin supports vector scaling using QImageReader's setScaledSize() method,
|
||||||
so when used like in the following example:
|
so when used like in the following example:
|
||||||
```cpp
|
```cpp
|
||||||
@ -34,6 +39,7 @@ reader.read(&image);
|
|||||||
```
|
```
|
||||||
you will get 1024x1024px tiles with a pixel ratio of 2 (= HiDPI tiles).
|
you will get 1024x1024px tiles with a pixel ratio of 2 (= HiDPI tiles).
|
||||||
|
|
||||||
|
### Overzoom
|
||||||
Since version 2.7 tile overzoom is supported. If you set *format* to
|
Since version 2.7 tile overzoom is supported. If you set *format* to
|
||||||
`$zoom;$overzoom`:
|
`$zoom;$overzoom`:
|
||||||
```cpp
|
```cpp
|
||||||
@ -45,9 +51,6 @@ you will get (512<<overzoom)x(512<<overzoom)px tiles with a pixel ratio of 1.
|
|||||||
When overzoom is combined with setScaledSize(), the base size is the overzoomed
|
When overzoom is combined with setScaledSize(), the base size is the overzoomed
|
||||||
tile size.
|
tile size.
|
||||||
|
|
||||||
For a sample code see the [pbf2png](https://github.com/tumic0/pbf2png)
|
|
||||||
conversion utility.
|
|
||||||
|
|
||||||
## Styles
|
## Styles
|
||||||
The map style is loaded from the
|
The map style is loaded from the
|
||||||
[$AppDataLocation](http://doc.qt.io/qt-5/qstandardpaths.html)/style/style.json
|
[$AppDataLocation](http://doc.qt.io/qt-5/qstandardpaths.html)/style/style.json
|
||||||
|
Loading…
Reference in New Issue
Block a user