From 2848d451f67695ab34e7b2832f24c1e948784cc7 Mon Sep 17 00:00:00 2001 From: Karl Georg Bedrich Date: Tue, 9 Jun 2020 08:33:12 +0200 Subject: [PATCH] draw connector lines between gradient and region with anti-aliasing (#496) Co-authored-by: serkgb Co-authored-by: Ogi Moore --- pyqtgraph/graphicsItems/HistogramLUTItem.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyqtgraph/graphicsItems/HistogramLUTItem.py b/pyqtgraph/graphicsItems/HistogramLUTItem.py index ad39b60e..38f1e5b4 100644 --- a/pyqtgraph/graphicsItems/HistogramLUTItem.py +++ b/pyqtgraph/graphicsItems/HistogramLUTItem.py @@ -142,6 +142,7 @@ class HistogramLUTItem(GraphicsWidget): p1 = self.vb.mapFromViewToItem(self, Point(self.vb.viewRect().center().x(), rgn[0])) p2 = self.vb.mapFromViewToItem(self, Point(self.vb.viewRect().center().x(), rgn[1])) gradRect = self.gradient.mapRectToParent(self.gradient.gradRect.rect()) + p.setRenderHint(QtGui.QPainter.Antialiasing) for pen in [fn.mkPen((0, 0, 0, 100), width=3), pen]: p.setPen(pen) p.drawLine(p1 + Point(0, 5), gradRect.bottomLeft())