Refractor drawing grid

This commit is contained in:
2025-05-27 16:16:30 +02:00
parent e587d84e05
commit 6069ebbbac
4 changed files with 133 additions and 115 deletions
+10
View File
@@ -5,6 +5,7 @@
#include <QPointF>
#include <QVector>
#include <QVariant>
#include <QPainterPath>
#include <wcslib/wcs.h>
#include <cmath>
#include <memory>
@@ -53,6 +54,14 @@ struct SkyPointScale
double scaleHigh = 10000.0;
};
struct SkyGrid
{
bool empty = true;
QPainterPath grid;
QVector<QPair<QPointF, QString>> text;
void clear();
};
class WCSDataT
{
int nwcs = 0;
@@ -70,6 +79,7 @@ public:
void calculateBounds(double &minRa, double &maxRa, double &minDec, double &maxDec, double &crVal1, double &crVal2) const;
bool valid() const { return wcs; };
SkyPointScale getRaDecScale() const;
SkyGrid prepareGrid(uint32_t w, uint32_t h);
};
struct ImageInfoData