mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: turn axes into QSGNode
Render the labels and the title into a pixmap and render the ticks and the base line using individual QSGNodes. Attempting to render the ticks likewise into the pixmap gave horrible results, because (quite obviously) rendering with QPainter and the QSG shader gives non-matching ticks and grid lines. The memory management had to be changed a bit: The ChartItems were collected in the root QSGNode. However, the axes are added before the first plotting, so this node might not exist. Therefore, store the axes in the StatsView object. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9b7565e81a
commit
ada5e8a49d
4 changed files with 143 additions and 117 deletions
|
@ -142,6 +142,7 @@ private:
|
|||
|
||||
StatsState state;
|
||||
QFont titleFont;
|
||||
std::unique_ptr<std::vector<ChartItem *>[]> chartItems;
|
||||
std::vector<std::unique_ptr<StatsAxis>> axes;
|
||||
std::unique_ptr<StatsGrid> grid;
|
||||
std::vector<std::unique_ptr<StatsSeries>> series;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue