summaryrefslogtreecommitdiffstats
path: root/stats/chartitem.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-19 16:09:56 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2021-01-20 08:47:18 +0100
commit4f58e9aa62d29a31ff8df74bea75cb770a0d50ff (patch)
tree5a33233faf90fd7cd1a74c8e145ec34928a339d9 /stats/chartitem.h
parent2e2019dea7087937d7bcc0e9bd2598d61a758b65 (diff)
downloadsubsurface-4f58e9aa62d29a31ff8df74bea75cb770a0d50ff.tar.gz
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>
Diffstat (limited to 'stats/chartitem.h')
-rw-r--r--stats/chartitem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/stats/chartitem.h b/stats/chartitem.h
index 6c8919dec..cf20f55a8 100644
--- a/stats/chartitem.h
+++ b/stats/chartitem.h
@@ -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;