def draw_interface_ball_and_socket(self, _box, context, _bounding_box):
    cr = context.cairo
    h_nw = self._handles[NW]
    (cx, cy) = ((h_nw.pos.x + (self.width / 2)), (h_nw.pos.y + (self.height / 2)))
    if (self._folded in (Folded.REQUIRED, Folded.ASSEMBLY)):
        r = self.RADIUS_REQUIRED
        if (self.side == Side.N):
            (x, y) = ((r * 2), r)
        elif (self.side == Side.E):
            (x, y) = (r, (r * 2))
        elif (self.side == Side.S):
            (x, y) = (0, r)
        elif (self.side == Side.W):
            (x, y) = (r, 0)
        cr.move_to(x, y)
        cr.arc_negative(cx, cy, self.RADIUS_REQUIRED, self.side.value, (pi + self.side.value))
    if (self._folded in (Folded.PROVIDED, Folded.ASSEMBLY)):
        cr.move_to((cx + self.RADIUS_PROVIDED), cy)
        cr.arc(cx, cy, self.RADIUS_PROVIDED, 0, (pi * 2))
    cr.stroke()
def draw_interface_ball_and_socket(self, _box, context, _bounding_box):
    cr = context.cairo
    h_nw = self._handles[NW]
    (cx, cy) = ((h_nw.pos.x + (self.width / 2)), (h_nw.pos.y + (self.height / 2)))
    if (self._folded in (Folded.REQUIRED, Folded.ASSEMBLY)):
        r = self.RADIUS_REQUIRED
        if (self.side == Side.N):
            (x, y) = ((r * 2), r)
        elif (self.side == Side.E):
            (x, y) = (r, (r * 2))
        elif (self.side == Side.S):
            (x, y) = (0, r)
        elif (self.side == Side.W):
            (x, y) = (r, 0)
        cr.move_to(x, y)
        cr.arc_negative(cx, cy, self.RADIUS_REQUIRED, self.side.value, (pi + self.side.value))
    if (self._folded in (Folded.PROVIDED, Folded.ASSEMBLY)):
        cr.move_to((cx + self.RADIUS_PROVIDED), cy)
        cr.arc(cx, cy, self.RADIUS_PROVIDED, 0, (pi * 2))
    cr.stroke()