Marble

TextureColorizer.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
5 //
6 
7 //
8 // The TextureColorizer maps the Elevationvalues to Legend Colors.
9 //
10 
11 #ifndef MARBLE_TEXTURECOLORIZER_H
12 #define MARBLE_TEXTURECOLORIZER_H
13 
14 #include "MarbleGlobal.h"
15 #include "GeoDataDocument.h"
16 
17 #include <QString>
18 #include <QImage>
19 #include <QColor>
20 
21 namespace Marble
22 {
23 
24 class GeoPainter;
25 class ViewportParams;
26 
27 class TextureColorizer
28 {
29  public:
30  TextureColorizer( const QString &seafile,
31  const QString &landfile );
32 
33  virtual ~TextureColorizer(){}
34 
35  void addSeaDocument( const GeoDataDocument *seaDocument );
36 
37  void addLandDocument( const GeoDataDocument *landDocument );
38 
39  void setShowRelief( bool show );
40 
41  static void drawIndividualDocument( GeoPainter *painter, const GeoDataDocument *document );
42 
43  void drawTextureMap( GeoPainter *painter );
44 
45  void colorize( QImage *origimg, const ViewportParams *viewport, MapQuality mapQuality );
46 
47  void setPixel( const QRgb *coastData, QRgb *writeData, int bump, uchar grey );
48 
49  private:
50  QString m_seafile;
51  QString m_landfile;
52  QList<const GeoDataDocument*> m_seaDocuments;
53  QList<const GeoDataDocument*> m_landDocuments;
54  QImage m_coastImage;
55  uint texturepalette[16][512];
56  bool m_showRelief;
57  QRgb m_landColor;
58  QRgb m_seaColor;
59 };
60 
61 }
62 
63 #endif
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:74
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.