21 lines
535 B
C++
21 lines
535 B
C++
#pragma once
|
|
|
|
#include "model/EditorTypes.h"
|
|
|
|
namespace TikzRefinery {
|
|
|
|
// Scene units are independent of viewport pixels, zoom and pan.
|
|
class tkrCoordinateMapper final
|
|
{
|
|
public:
|
|
OperationResult configure(const QPointF &ptSceneOrigin, qreal rSceneUnitsPerCentimeter);
|
|
QPointF mapToScene(const QPointF &ptTikzPosition) const;
|
|
QPointF mapToTikz(const QPointF &ptScenePosition) const;
|
|
|
|
private:
|
|
QPointF m_ptSceneOrigin = QPointF(200.0, 300.0);
|
|
qreal m_rSceneUnitsPerCentimeter = 100.0;
|
|
};
|
|
|
|
} // namespace TikzRefinery
|