File indexing completed on 2024-05-05 03:49:14

0001 // SPDX-FileCopyrightText: 2010 Jens-Michael Hoffmann <jmho@c-xx.com>
0002 //
0003 // SPDX-License-Identifier: LGPL-2.1-or-later
0004 
0005 #ifndef MARBLE_SUN_LIGHT_BLENDING_H
0006 #define MARBLE_SUN_LIGHT_BLENDING_H
0007 
0008 #include <QtGlobal>
0009 
0010 #include "Blending.h"
0011 
0012 namespace Marble
0013 {
0014 
0015 class SunLocator;
0016 
0017 class SunLightBlending: public Blending
0018 {
0019  public:
0020     explicit SunLightBlending( const SunLocator * sunLocator );
0021     ~SunLightBlending() override;
0022     void blend( QImage * const bottom, TextureTile const * const top ) const override;
0023 
0024     void setLevelZeroLayout( int levelZeroColumns, int levelZeroRows );
0025 
0026  private:
0027     static int maxDivisor( int maximum, int fullLength );
0028     const SunLocator * const m_sunLocator;
0029     int m_levelZeroColumns;
0030     int m_levelZeroRows;
0031 };
0032 
0033 }
0034 
0035 #endif