Merge pull request #1044 from ixjlyons/plotcurveitem-paintgl-fix
Fix PlotCurveItem.paintGL
This commit is contained in:
commit
c9d27dc153
@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
from ..Qt import QtGui, QtCore
|
from ..Qt import QtGui, QtCore
|
||||||
try:
|
try:
|
||||||
from ..Qt import QtOpenGL
|
from ..Qt import QtOpenGL
|
||||||
@ -570,7 +571,7 @@ class PlotCurveItem(GraphicsObject):
|
|||||||
gl.glEnable(gl.GL_BLEND)
|
gl.glEnable(gl.GL_BLEND)
|
||||||
gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
|
gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
|
||||||
gl.glHint(gl.GL_LINE_SMOOTH_HINT, gl.GL_NICEST)
|
gl.glHint(gl.GL_LINE_SMOOTH_HINT, gl.GL_NICEST)
|
||||||
gl.glDrawArrays(gl.GL_LINE_STRIP, 0, pos.size / pos.shape[-1])
|
gl.glDrawArrays(gl.GL_LINE_STRIP, 0, int(pos.size / pos.shape[-1]))
|
||||||
finally:
|
finally:
|
||||||
gl.glDisableClientState(gl.GL_VERTEX_ARRAY)
|
gl.glDisableClientState(gl.GL_VERTEX_ARRAY)
|
||||||
finally:
|
finally:
|
||||||
@ -638,4 +639,3 @@ class ROIPlotItem(PlotCurveItem):
|
|||||||
def roiChangedEvent(self):
|
def roiChangedEvent(self):
|
||||||
d = self.getRoiData()
|
d = self.getRoiData()
|
||||||
self.updateData(d, self.xVals)
|
self.updateData(d, self.xVals)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user