示例#1
0
文件: arrow.py 项目: 251/shaape
 def __init__(self, position = (0, 0), node_list = []):
     Polygon.__init__(self, node_list)
     Translatable.__init__(self, position)
     Named.__init__(self)
     self.__connected_objects = []
     self.__pointed_objects = []
     self.add_name('_arrow_')
示例#2
0
 def __init__(self, position=(0, 0), node_list=[]):
     Polygon.__init__(self, node_list)
     Translatable.__init__(self, position)
     Named.__init__(self)
     self.__connected_objects = []
     self.__pointed_objects = []
     self.add_name('_arrow_')
示例#3
0
 def __init__(self, graph = nx.Graph()):
     Drawable.__init__(self)
     Named.__init__(self)
     self.style().set_target_type('fill')
     self.add_name('_line_')
     self.__graph = graph
     self.__generate_paths()
     return
示例#4
0
文件: text.py 项目: 251/shaape
 def __init__(self, text = "", position = (0, 0)):
     Drawable.__init__(self)
     Translatable.__init__(self, position)
     Named.__init__(self)
     self.__text = text
     self.__font_size = 1
     self.__scaled_direction = Vector(1, 0)
     return
示例#5
0
文件: opengraph.py 项目: 251/shaape
 def __init__(self, graph=nx.Graph(), options=[]):
     Drawable.__init__(self, options)
     Named.__init__(self)
     self.style().set_target_type("fill")
     self.add_name("_line_")
     self.__graph = graph
     self.__generate_paths()
     return
示例#6
0
文件: text.py 项目: tombujok/shaape
 def __init__(self, text="", position=(0, 0)):
     Drawable.__init__(self)
     Translatable.__init__(self, position)
     Named.__init__(self)
     self.__text = text
     self.__font_size = 1
     self.__scaled_direction = Vector(1, 0)
     return
示例#7
0
 def __init__(self, graph=nx.Graph(), options=[]):
     Drawable.__init__(self, options)
     Named.__init__(self)
     self.style().set_target_type('fill')
     self.add_name('_line_')
     self.__graph = graph
     self.__generate_paths()
     return
示例#8
0
 def __init__(self, node_list):
     Drawable.__init__(self)
     Named.__init__(self)
     self.__node_list = node_list
     cycle_graph = nx.Graph()
     if node_list:
         for n in range(1, len(node_list)):
             cycle_graph.add_edge(node_list[n - 1], node_list[n])
     self.style().set_target_type("fill")
     self.__frame = OpenGraph(cycle_graph)
     self.__frame.style().set_target_type("frame")
     return
示例#9
0
 def __init__(self, node_list, options=[]):
     Drawable.__init__(self, options)
     Named.__init__(self)
     self.__node_list = node_list
     cycle_graph = nx.Graph()
     if node_list:
         for n in range(1, len(node_list)):
             cycle_graph.add_edge(node_list[n - 1], node_list[n])
     self.style().set_target_type('fill')
     self.__frame = OpenGraph(cycle_graph, options)
     self.__frame.style().set_target_type('frame')
     return
示例#10
0
文件: arrow.py 项目: bmustiata/shaape
 def __init__(self, position = (0, 0), node_list = []):
     Polygon.__init__(self, node_list)
     Translatable.__init__(self, position)
     Named.__init__(self)
     self.add_name('_arrow_')