(self, edge, vertex)
Draws a loop edge.

        The default implementation draws a small circle.

        @param edge: the edge to be drawn. Visual properties of the edge
          are defined by the attributes of this object.
        @param vertex: the vertex to which the edge is attached. Visual
          properties are given again as attributes.
Draws a loop edge.
Draws a loop edge .
def draw_loop_edge(self, edge, vertex):
        """Draws a loop edge.

        The default implementation draws a small circle.

        @param edge: the edge to be drawn. Visual properties of the edge
          are defined by the attributes of this object.
        @param vertex: the vertex to which the edge is attached. Visual
          properties are given again as attributes.
        """
        ctx = self.context
        ctx.set_source_rgba(*edge.color)
        ctx.set_line_width(edge.width)
        radius = vertex.size * 1.5
        center_x = vertex.position[0] + cos(pi / 4) * radius / 2.0
        center_y = vertex.position[1] - sin(pi / 4) * radius / 2.0
        ctx.arc(center_x, center_y, radius / 2.0, 0, pi * 2)
        ctx.stroke()
def draw_loop_edge ( self , edge , vertex ) : ctx = self . context ctx . set_source_rgba ( * edge . color ) ctx . set_line_width ( edge . width ) radius = vertex . size * 1.5 center_x = vertex . position [ 0 ] + cos ( pi / 4 ) * radius / 2.0 center_y = vertex . position [ 1 ] - sin ( pi / 4 ) * radius / 2.0 ctx . arc ( center_x , center_y , radius / 2.0 , 0 , pi * 2 ) ctx . stroke ( )