File indexing completed on 2024-09-29 03:33:27
0001 #ifndef SIMPLEMAPIMAGE_H 0002 #define SIMPLEMAPIMAGE_H 0003 0004 #include "ReadOnlyMapImage.h" 0005 0006 #include <QString> 0007 #include <QColor> 0008 #include <QImage> 0009 0010 class InterpolationMethod; 0011 0012 class SimpleMapImage: public ReadOnlyMapImage 0013 { 0014 public: 0015 explicit SimpleMapImage( QString const & fileName ); 0016 0017 QRgb pixel( double const lonRad, double const latRad ) override; 0018 QRgb pixel( int const x, int const y ) override; 0019 void setInterpolationMethod( InterpolationMethod * const interpolationMethod ) override; 0020 0021 private: 0022 double lonRadToPixelX( double const lonRad ) const; 0023 double latRadToPixelY( double const latRad ) const; 0024 0025 QImage m_image; 0026 int m_mapWidthPixel; 0027 int m_mapHeightPixel; 0028 InterpolationMethod * m_interpolationMethod; 0029 }; 0030 0031 #endif