Marble

TileScalingTextureMapper.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010-2012 Bernhard Beschow <[email protected]>
4 //
5 
6 #ifndef MARBLE_TILESCALINGTEXTUREMAPPER_H
7 #define MARBLE_TILESCALINGTEXTUREMAPPER_H
8 
9 
10 #include <QObject>
11 #include "TextureMapperInterface.h"
12 
13 #include "TileId.h"
14 
15 #include <QCache>
16 #include <QImage>
17 #include <QPixmap>
18 
19 namespace Marble
20 {
21 
22 class StackedTileLoader;
23 
24 class TileScalingTextureMapper : public QObject, public TextureMapperInterface
25 {
26  Q_OBJECT
27 
28  public:
29  explicit TileScalingTextureMapper( StackedTileLoader *tileLoader, QObject *parent = nullptr );
30 
31  void mapTexture( GeoPainter *painter,
32  const ViewportParams *viewport,
33  int tileZoomLevel,
34  const QRect &dirtyRect,
35  TextureColorizer *texColorizer ) override;
36 
37  private Q_SLOTS:
38  void removePixmap( const TileId &tileId );
39  void clearPixmaps();
40 
41  private:
42  void mapTexture( GeoPainter *painter,
43  const ViewportParams *viewport,
44  int tileZoomLevel,
45  TextureColorizer *texColorizer );
46 
47  private:
48  StackedTileLoader *const m_tileLoader;
50  QImage m_canvasImage;
51  int m_radius;
52 };
53 
54 }
55 
56 #endif
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.