Marble

GroundLayer.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Cezar Mocan <mocancezar@gmail.com>
4//
5
6#include "GroundLayer.h"
7
8#include "GeoPainter.h"
9#include "ViewportParams.h"
10#include "RenderState.h"
11
12namespace Marble
13{
14
15GroundLayer::GroundLayer()
16 : m_color( QColor( 153, 179, 204 ) )
17{
18}
19
20GroundLayer::~GroundLayer()
21{
22}
23
24QStringList GroundLayer::renderPosition() const
25{
26 return QStringList(QStringLiteral("SURFACE"));
27}
28
29bool GroundLayer::render( GeoPainter *painter,
30 ViewportParams *viewParams,
31 const QString &renderPos,
32 GeoSceneLayer *layer )
33{
34 Q_UNUSED( renderPos )
35 Q_UNUSED( layer )
36
37 QBrush backgroundBrush( m_color );
38 QPen backgroundPen( Qt::NoPen );
39
40 painter->setBrush( backgroundBrush );
41 painter->setPen( backgroundPen );
42 painter->drawPath( viewParams->mapShape() );
43
44 return true;
45}
46
47qreal GroundLayer::zValue() const
48{
49 return -50.0;
50}
51
52void GroundLayer::setColor( const QColor &color )
53{
54 m_color = color;
55}
56
57QColor GroundLayer::color() const
58{
59 return m_color;
60}
61
62RenderState GroundLayer::renderState() const
63{
64 return RenderState(QStringLiteral("Ground"));
65}
66
67}
This file contains the headers for ViewportParams.
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 Fri Jun 14 2024 11:54:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.