Marble

TextureColorizer.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <tackat@kde.org>
4// SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
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 "GeoDataDocument.h"
15#include "MarbleGlobal.h"
16
17#include <QColor>
18#include <QImage>
19#include <QString>
20
21namespace Marble
22{
23
24class GeoPainter;
25class ViewportParams;
26
27class TextureColorizer
28{
29public:
30 TextureColorizer(const QString &seafile, const QString &landfile);
31
32 virtual ~TextureColorizer() = default;
33
34 void addSeaDocument(const GeoDataDocument *seaDocument);
35
36 void addLandDocument(const GeoDataDocument *landDocument);
37
38 void setShowRelief(bool show);
39
40 static void drawIndividualDocument(GeoPainter *painter, const GeoDataDocument *document);
41
42 void drawTextureMap(GeoPainter *painter);
43
44 void colorize(QImage *origimg, const ViewportParams *viewport, MapQuality mapQuality);
45
46 void setPixel(const QRgb *coastData, QRgb *writeData, int bump, uchar grey);
47
48private:
49 QString m_seafile;
50 QString m_landfile;
51 QList<const GeoDataDocument *> m_seaDocuments;
52 QList<const GeoDataDocument *> m_landDocuments;
53 QImage m_coastImage;
54 uint texturepalette[16][512];
55 bool m_showRelief;
56 QRgb m_landColor;
57 QRgb m_seaColor;
58};
59
60}
61
62#endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.