mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
draw 2 more pixels on each side of trigon
This commit is contained in:
parent
5208583d8f
commit
fbea4e4f9d
1 changed files with 8 additions and 0 deletions
|
|
@ -741,6 +741,10 @@ class QtColorTriangle(QtWidgets.QWidget):
|
|||
gdelta = (rc.g - g) / xdist
|
||||
bdelta = (rc.b - b) / xdist
|
||||
|
||||
# Draw 2 more pixels on left side for smoothing
|
||||
for x in range(lxi - 2, lxi):
|
||||
buf.setPixel(x, y, QtGui.qRgb(int(r), int(g), int(b)))
|
||||
|
||||
# Inner loop 2. Draws the line from left to right.
|
||||
for x in range(lxi, rxi):
|
||||
buf.setPixel(x, y, QtGui.qRgb(int(r), int(g), int(b)))
|
||||
|
|
@ -748,6 +752,10 @@ class QtColorTriangle(QtWidgets.QWidget):
|
|||
g += gdelta
|
||||
b += bdelta
|
||||
|
||||
# Draw 2 more pixels on right side for smoothing
|
||||
for x in range(rxi, rxi + 3):
|
||||
buf.setPixel(x, y, QtGui.qRgb(int(r), int(g), int(b)))
|
||||
|
||||
def _radius_at(self, pos, rect):
|
||||
mousexdist = pos.x() - float(rect.center().x())
|
||||
mouseydist = pos.y() - float(rect.center().y())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue