File indexing completed on 2025-01-05 03:59:16
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2006-2009 Torsten Rahn <tackat@kde.org> 0004 // SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de> 0005 0006 #ifndef MARBLE_GEOPAINTERPRIVATE_H 0007 #define MARBLE_GEOPAINTERPRIVATE_H 0008 0009 #include "MarbleGlobal.h" 0010 //#include "GeoPainter.h" 0011 0012 class QPolygonF; 0013 class QSizeF; 0014 class QPainterPath; 0015 class QRectF; 0016 0017 namespace Marble 0018 { 0019 0020 class ViewportParams; 0021 class GeoDataCoordinates; 0022 class GeoPainter; 0023 0024 class GeoPainterPrivate 0025 { 0026 public: 0027 GeoPainterPrivate( GeoPainter* q, const ViewportParams *viewport, MapQuality mapQuality ); 0028 0029 ~GeoPainterPrivate(); 0030 0031 0032 static void createAnnotationLayout ( qreal x, qreal y, 0033 const QSizeF& bubbleSize, 0034 qreal bubbleOffsetX, qreal bubbleOffsetY, 0035 qreal xRnd, qreal yRnd, 0036 QPainterPath& path, QRectF& rect ); 0037 0038 static GeoDataLinearRing createLinearRingFromGeoRect( const GeoDataCoordinates & centerCoordinates, 0039 qreal width, qreal height ); 0040 0041 static bool doClip( const ViewportParams *viewport ); 0042 0043 static qreal normalizeAngle(qreal angle); 0044 0045 void drawTextRotated( const QPointF &startPoint, qreal angle, const QString &text ); 0046 0047 const ViewportParams *const m_viewport; 0048 const MapQuality m_mapQuality; 0049 qreal *const m_x; 0050 0051 private: 0052 GeoPainter* m_parent; 0053 }; 0054 0055 } // namespace Marble 0056 0057 #endif