Пример #1
0
  def __init__(self, tail, head, **kwargs):
    self.tail = tail
    self.head = head
    self.directional = process_directional(True, kwargs)

    if self.tail == self.head:
      sys.exit('Error: Cannot connect a node to itself. (' + str(self.tail) + ' -/-> ' + str(self.head) + ')')

    if self.directional:
      self.string_connector = " --> "
    else:
      self.string_connector = " --- "

    self.label_location = process_label_location('top', kwargs)
    self.label_shift = process_label_shift(0.0, kwargs)
    super(Edge, self).__init__(Point(0.0, 0.0), ll = self.label_location, **kwargs)

    self.reflect = process_reflect(None, kwargs)
    self.angle = None

    # Arrow property processing option
    self.edge_width = process_width(0.025, kwargs)
    self.head_width_to_edge_width = process_head_width_to_width(3.0, kwargs)
    self.head_length_to_head_width = process_head_length_to_head_width(2.0, kwargs)
    self.overhang = process_overhang(0.0, kwargs)
    self.alpha = process_alpha(1.0, kwargs)
    self.face_color = process_face_color((0.0, 0.0, 0.0), kwargs)

    self.draw_bool = process_draw(True, kwargs)
    self.draw_label_bool = process_draw_label(True, kwargs)

    self._instances[id(self)] = self
Пример #2
0
 def __init__(self, junction_edges, **kwargs):
   self.junction_edges = junction_edges
   self.label_edge_number = process_label_edge_number(0, kwargs)
   self.labeled_edge = self.junction_edges[self.label_edge_number]
   self.label_location = process_label_location('top', kwargs)
   self.label_shift = process_label_shift(0.0, kwargs)
   self.name = process_name(None, kwargs)
   super(Junction, self).__init__(Point(0.0, 0.0), ll = self.label_location, **kwargs)
   self.label_string = self.name
   self.reflect = process_reflect(None, kwargs)
   self.angle = None
Пример #3
0
 def __init__(self, junction_edges, **kwargs):
     self.junction_edges = junction_edges
     self.label_edge_number = process_label_edge_number(0, kwargs)
     self.labeled_edge = self.junction_edges[self.label_edge_number]
     self.label_location = process_label_location('top', kwargs)
     self.label_shift = process_label_shift(0.0, kwargs)
     self.name = process_name(None, kwargs)
     super(Junction, self).__init__(Point(0.0, 0.0),
                                    ll=self.label_location,
                                    **kwargs)
     self.label_string = self.name
     self.reflect = process_reflect(None, kwargs)
     self.angle = None
Пример #4
0
    def __init__(self, tail, head, **kwargs):
        self.tail = tail
        self.head = head
        self.directional = process_directional(True, kwargs)

        if self.tail == self.head:
            sys.exit('Error: Cannot connect a node to itself. (' +
                     str(self.tail) + ' -/-> ' + str(self.head) + ')')

        if self.directional:
            self.string_connector = " --> "
        else:
            self.string_connector = " --- "

        self.label_location = process_label_location('top', kwargs)
        self.label_shift = process_label_shift(0.0, kwargs)
        super(Edge, self).__init__(Point(0.0, 0.0),
                                   ll=self.label_location,
                                   **kwargs)

        self.reflect = process_reflect(None, kwargs)
        self.angle = None

        # Arrow property processing option
        self.edge_width = process_width(0.025, kwargs)
        self.head_width_to_edge_width = process_head_width_to_width(
            3.0, kwargs)
        self.head_length_to_head_width = process_head_length_to_head_width(
            2.0, kwargs)
        self.overhang = process_overhang(0.0, kwargs)
        self.alpha = process_alpha(1.0, kwargs)
        self.face_color = process_face_color((0.0, 0.0, 0.0), kwargs)

        self.draw_bool = process_draw(True, kwargs)
        self.draw_label_bool = process_draw_label(True, kwargs)

        self._instances[id(self)] = self
Пример #5
0
 def __init__(self, center_of_rotation, **kwargs):
   self.center_of_rotation = center_of_rotation
   self.angle = process_angle(0.0, kwargs)
   self._get_angle_in_radians()
   self.reflect = process_reflect(None, kwargs)
Пример #6
0
 def __init__(self, center_of_rotation, **kwargs):
     self.center_of_rotation = center_of_rotation
     self.angle = process_angle(0.0, kwargs)
     self._get_angle_in_radians()
     self.reflect = process_reflect(None, kwargs)