def METHOD_NAME(self, painter, rect):
    if not self.det_mode:
        return
    if self.coords is not None and self.coords != QPointF(-1, -1):
        painter.setClipRect(rect)
        painter.setPen(self.pen)
        painter.drawLine(
            int(self.coords.x()),
            int(rect.top()), int(self.coords.x()), int(rect.bottom() + 1))
        painter.drawLine(
            int(rect.left()),
            int(self.coords.y()),
            int(rect.right() + 1), int(self.coords.y()))