fix: circular texture was slightly off-center (#1012)
This commit is contained in:
parent
c94b1cb99e
commit
8c137a1caf
@ -61,7 +61,7 @@ class GLScatterPlotItem(GLGraphicsItem):
|
|||||||
## Generate texture for rendering points
|
## Generate texture for rendering points
|
||||||
w = 64
|
w = 64
|
||||||
def fn(x,y):
|
def fn(x,y):
|
||||||
r = ((x-w/2.)**2 + (y-w/2.)**2) ** 0.5
|
r = ((x-(w-1)/2.)**2 + (y-(w-1)/2.)**2) ** 0.5
|
||||||
return 255 * (w/2. - np.clip(r, w/2.-1.0, w/2.))
|
return 255 * (w/2. - np.clip(r, w/2.-1.0, w/2.))
|
||||||
pData = np.empty((w, w, 4))
|
pData = np.empty((w, w, 4))
|
||||||
pData[:] = 255
|
pData[:] = 255
|
||||||
|
Loading…
Reference in New Issue
Block a user