class_docstr: Class representing a single plot curve. Instances of this class are created
  automatically as part of :class:`PlotDataItem <pyqtgraph.PlotDataItem>`; 
  these rarely need to be instantiated directly.
  
  Features:
  
    - Fast data update
    - Fill under curve
    - Mouse interaction
  
  =====================  ===============================================
  **Signals:**
  sigPlotChanged(self)   Emitted when the data being plotted has changed
  sigClicked(self, ev)   Emitted when the curve is clicked
  =====================  ===============================================
class_docstr_tok: ["Class","representing","a","single","plot","curve",".","Instances","of","this","class","are","created","automatically","as","part","of",":","class",":","`","PlotDataItem","<","pyqtgraph.PlotDataItem",">","`",";","these","rarely","need","to","be","instantiated","directly",".","Features",":","-","Fast","data","update","-","Fill","under","curve","-","Mouse","interaction","=====================","===============================================","*","*","Signals",":","*","*","sigPlotChanged","(","self",")","Emitted","when","the","data","being","plotted","has","changed","sigClicked","(","self",",","ev",")","Emitted","when","the","curve","is","clicked","=====================","==============================================="]
code: def paintGL(self, p, opt, widget):
      p.beginNativePainting()
      import OpenGL.GL as gl
  
      if sys.platform == "win32":
          # If Qt is built to dynamically load OpenGL, then the projection and
          # modelview matrices are not setup.
          # https://doc.qt.io/qt-6/windows-graphics.html
          # https://code.woboq.org/qt6/qtbase/src/opengl/qopenglpaintengine.cpp.html
          # Technically, we could enable it for all platforms, but for now, just
          # enable it where it is required, i.e. Windows
          gl.glMatrixMode(gl.GL_PROJECTION)
          gl.glLoadIdentity()
          gl.glOrtho(
              0, widget.width(), widget.height(), 0, -999999, 999999
          )
          gl.glMatrixMode(gl.GL_MODELVIEW)
          mat = QtGui.QMatrix4x4(self.sceneTransform())
          gl.glLoadMatrixf(np.array(mat.data(), dtype=np.float32))
  
      ## set clipping viewport
      view = self.getViewBox()
      if view is not None:
          rect = view.mapRectToItem(self, view.boundingRect())
          # gl.glViewport(int(rect.x()), int(rect.y()), int(rect.width()), int(rect.height()))
  
          # gl.glTranslate(-rect.x(), -rect.y(), 0)
  
          gl.glEnable(gl.GL_STENCIL_TEST)
          gl.glColorMask(
              gl.GL_FALSE, gl.GL_FALSE, gl.GL_FALSE, gl.GL_FALSE
          )  # disable drawing to frame buffer
          gl.glDepthMask(gl.GL_FALSE)  # disable drawing to depth buffer
          gl.glStencilFunc(gl.GL_NEVER, 1, 0xFF)
          gl.glStencilOp(gl.GL_REPLACE, gl.GL_KEEP, gl.GL_KEEP)
  
          ## draw stencil pattern
          gl.glStencilMask(0xFF)
          gl.glClear(gl.GL_STENCIL_BUFFER_BIT)
          gl.glBegin(gl.GL_TRIANGLES)
          gl.glVertex2f(rect.x(), rect.y())
          gl.glVertex2f(rect.x() + rect.width(), rect.y())
          gl.glVertex2f(rect.x(), rect.y() + rect.height())
          gl.glVertex2f(
              rect.x() + rect.width(), rect.y() + rect.height()
          )
          gl.glVertex2f(rect.x() + rect.width(), rect.y())
          gl.glVertex2f(rect.x(), rect.y() + rect.height())
          gl.glEnd()
  
          gl.glColorMask(gl.GL_TRUE, gl.GL_TRUE, gl.GL_TRUE, gl.GL_TRUE)
          gl.glDepthMask(gl.GL_TRUE)
          gl.glStencilMask(0x00)
          gl.glStencilFunc(gl.GL_EQUAL, 1, 0xFF)
  
      try:
          x, y = self.getData()
          pos = np.empty((len(x), 2), dtype=np.float32)
          pos[:, 0] = x
          pos[:, 1] = y
          gl.glEnableClientState(gl.GL_VERTEX_ARRAY)
          try:
              gl.glVertexPointerf(pos)
              pen = fn.mkPen(self.opts["pen"])
              gl.glColor4f(*pen.color().getRgbF())
              width = pen.width()
              if pen.isCosmetic() and width < 1:
                  width = 1
              gl.glPointSize(width)
              gl.glLineWidth(width)
  
              # enable antialiasing if requested
              if self._exportOpts is not False:
                  aa = self._exportOpts.get("antialias", True)
              else:
                  aa = self.opts["antialias"]
              if aa:
                  gl.glEnable(gl.GL_LINE_SMOOTH)
                  gl.glEnable(gl.GL_BLEND)
                  gl.glBlendFunc(
                      gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA
                  )
                  gl.glHint(gl.GL_LINE_SMOOTH_HINT, gl.GL_NICEST)
              else:
                  gl.glDisable(gl.GL_LINE_SMOOTH)
  
              gl.glDrawArrays(gl.GL_LINE_STRIP, 0, pos.shape[0])
          finally:
              gl.glDisableClientState(gl.GL_VERTEX_ARRAY)
      finally:
          p.endNativePainting()
  
imports: from ..Qt import QtCore, QtGui, QtWidgets
  import math
  import sys
  import warnings
  import numpy
  from ..None import Qt, debug
  from ..None import functions
  from ..None import getConfigOption
  from .GraphicsObject import GraphicsObject
label_desc: Use image node_id 30 for calling the PlotCurveItem obj's underlying member method code with example usage: obj.paintGL(p, opt, widget) without return types