draw connector lines between gradient and region with anti-aliasing (#496)

Co-authored-by: serkgb <serkgb@J873GY1-2.stf.nus.edu.sg>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
This commit is contained in:
Karl Georg Bedrich 2020-06-09 08:33:12 +02:00 committed by GitHub
parent b12f9174bc
commit 2848d451f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())