code: def setState(self, *xy):
      xy = list(xy)
      d = hypot(xy[0], xy[1])  # length
      nxy = [0, 0]
      for i in [0, 1]:
          if xy[i] == 0:
              nxy[i] = 0
          else:
              nxy[i] = xy[i] / d
  
      if d > self.radius:
          d = self.radius
      d = (d / self.radius) ** 2
      xy = [nxy[0] * d, nxy[1] * d]
  
      w2 = self.width() / 2
      h2 = self.height() / 2
      self.spotPos = QtCore.QPoint(
          int(w2 * (1 + xy[0])), int(h2 * (1 - xy[1]))
      )
      self.update()
      if self.state == xy:
          return
      self.state = xy
      self.sigStateChanged.emit(self, self.state)
  
file_path: pyqtgraph/pyqtgraph/widgets/JoystickButton.py
imports: from math import hypot
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 8 for calling the JoystickButton obj's underlying member method code with example usage: obj.setState() without return types