mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2025-07-04 23:09:29 +02:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
12c878d8e2 | |||
44862114ab | |||
1065a27bfb | |||
3c22cd7823 | |||
1afd242302 | |||
ae8b2f00db | |||
e22ea9aa12 | |||
62a78fdaae | |||
63f86a900e | |||
ea8819a381 |
22
.github/workflows/linux.yml
vendored
Normal file
22
.github/workflows/linux.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: Linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: QtPBFImagePlugin
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake libprotobuf-dev protobuf-compiler zlib1g-dev
|
||||
- name: Configure build
|
||||
run: qmake pbfplugin.pro
|
||||
- name: Build project
|
||||
run: make -j2
|
22
.github/workflows/osx.yml
vendored
Normal file
22
.github/workflows/osx.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: OS X
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: QtPBFImagePlugin
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- name: Set environment variables
|
||||
run: echo "PATH=/usr/local/opt/qt@5/bin:$PATH" >> $GITHUB_ENV
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: brew install qt5 protobuf
|
||||
- name: Configure build
|
||||
run: qmake PROTOBUF=/usr/local pbfplugin.pro
|
||||
- name: Build project
|
||||
run: make -j3
|
23
.travis.yml
23
.travis.yml
@ -1,23 +0,0 @@
|
||||
language: c++
|
||||
dist: focal
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
env:
|
||||
- QT_SELECT=qt5
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
|
||||
|
||||
install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt protobuf; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install qtbase5-dev qtbase5-dev-tools qt5-qmake libprotobuf-dev protobuf-compiler; fi
|
||||
|
||||
script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/qt/bin/:${PATH}; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then qmake PROTOBUF=/usr/local pbfplugin.pro; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then qmake pbfplugin.pro; fi
|
||||
- make
|
@ -7,7 +7,7 @@ displaying raster MBTiles maps or raster XYZ online maps to also display
|
||||
PBF(MVT) vector tiles without (almost, see usage) any application modifications.
|
||||
|
||||
Standard Mapbox GL Styles are used for styling the maps. Most relevant style
|
||||
features used by [Maputnik](http://editor.openmaptiles.org) are supported.
|
||||
features used by [Maputnik](https://maputnik.github.io/editor) are supported.
|
||||
A default fallback style (OSM-Liberty) for OpenMapTiles is part of the plugin.
|
||||
|
||||
"Plain" PBF files as well as gzip compressed files (as used in MBTiles) are
|
||||
@ -43,7 +43,8 @@ The map style is loaded from the
|
||||
file on plugin load. If the style uses a sprite, the sprite JSON file must
|
||||
be named `sprite.json` and the sprite image `sprite.png` and both files must be
|
||||
placed in the same directory as the style itself. *A style compatible with the
|
||||
tiles data schema (Mapbox, OpenMapTiles, Tilezen) must be used.*
|
||||
tiles data schema (Mapbox, OpenMapTiles, Tilezen, Ordnance Survey, Esri, ...)
|
||||
must be used.*
|
||||
|
||||
For a list of "ready to use" styles see the
|
||||
[QtPBFImagePlugin-styles](https://github.com/tumic0/QtPBFImagePlugin-styles)
|
||||
@ -51,7 +52,7 @@ repository.
|
||||
|
||||
## Build
|
||||
### Requirements
|
||||
* Qt5 >= 5.12 or Qt6
|
||||
* Qt5 >= 5.11 or Qt6
|
||||
* Google Protocol Buffers (protobuf-lite)
|
||||
* Zlib
|
||||
|
||||
|
@ -11,7 +11,10 @@ public:
|
||||
: _zoom(zoom), _size(img->size()), _scale(scale),
|
||||
_text(QSize(img->size().width() / scale.x(),
|
||||
img->size().height() / scale.y())), _painter(img)
|
||||
{_painter.scale(scale.x(), scale.y());}
|
||||
{
|
||||
img->fill(Qt::transparent);
|
||||
_painter.scale(scale.x(), scale.y());
|
||||
}
|
||||
|
||||
int zoom() const {return _zoom;}
|
||||
const QSize &size() const {return _size;}
|
||||
|
Reference in New Issue
Block a user