def METHOD_NAME(self):
    w, h = self.logical_size
    dpr = self.pixel_ratio
    buf = np.empty((int(h * dpr), int(w * dpr), 4), dtype=np.uint8)
    qimg = fn.ndarray_to_qimage(buf, QtGui.QImage.Format.Format_RGBX8888)
    qimg.fill(QtCore.Qt.GlobalColor.transparent)
    qimg.setDevicePixelRatio(dpr)
    painter = QtGui.QPainter(qimg)
    self.gfxView.render(painter, self.gfxView.viewRect(), self.gfxView.rect())
    painter.end()
    return buf