mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: render bar and pie labels onto fill color
The labels in bar an pie charts are realized as individual QSG pixmap nodes with an alpha channel. Sadly, rendering bright labels onto a transparent background gives very ugly artifacts. As a stop gap measure, until the problem is understood, render on a background with the color of the pie slice or bar. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2e2019dea7
commit
4f58e9aa62
5 changed files with 29 additions and 19 deletions
|
|
@ -89,7 +89,8 @@ class ChartTextItem : public ChartPixmapItem {
|
|||
public:
|
||||
ChartTextItem(StatsView &v, ChartZValue z, const QFont &f, const std::vector<QString> &text, bool center);
|
||||
ChartTextItem(StatsView &v, ChartZValue z, const QFont &f, const QString &text);
|
||||
void setColor(const QColor &color);
|
||||
void setColor(const QColor &color); // Draw on transparent background
|
||||
void setColor(const QColor &color, const QColor &background); // Fill rectangle with given background color
|
||||
private:
|
||||
QFont f;
|
||||
double fontHeight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue