コード例 #1
0
ファイル: TextBoard.py プロジェクト: compmonks/pyff_py35
 def _create_frame(self, root_node_path, width, height):
     # top
     node, _vdata = create_line(0, 0, width, 0)
     root_node_path.attachNewNode(node)
     # right side
     node, _vdata = create_line(width, 0, width, -height)
     root_node_path.attachNewNode(node)
     # bottom side
     node, _vdata = create_line(width, -height, 0, -height)
     root_node_path.attachNewNode(node)
     # right side
     node, _vdata = create_line(0, -height, 0, 0)
     root_node_path.attachNewNode(node)
コード例 #2
0
ファイル: TextBoard.py プロジェクト: JingLu92/pyff
 def _create_frame(self, root_node_path, width, height):
     # top
     node, _vdata = create_line(0, 0, width, 0)
     root_node_path.attachNewNode(node)
     # right side
     node, _vdata = create_line(width, 0, width, -height)
     root_node_path.attachNewNode(node)
     # bottom side
     node, _vdata = create_line(width, -height, 0, -height)
     root_node_path.attachNewNode(node)
     # right side
     node, _vdata = create_line(0, -height, 0, 0)
     root_node_path.attachNewNode(node)
コード例 #3
0
 def _create_frame(self, height, width, thresholds, root_node_path):
     # create surrounding first
     # bottom line
     node, _vdata = create_line(-width / 2.0, 0, width / 2.0, 0)
     root_node_path.attachNewNode(node)
     # left line
     node, _vdata = create_line(-width / 2.0, 0, -width / 2.0, height)
     root_node_path.attachNewNode(node)
     # top line
     node, _vdata = create_line(-width / 2.0, height, width / 2.0, height)
     root_node_path.attachNewNode(node)
     # right line
     node, _vdata = create_line(width / 2.0, 0, width / 2.0, height)
     root_node_path.attachNewNode(node)
     # create the threshold lines
     t1, t2 = thresholds
     node, self.t1_vdata = create_line(-width / 2.0, t1, width / 2.0, t1)
     root_node_path.attachNewNode(node)
     node, self.t2_vdata = create_line(-width / 2.0, t2, width / 2.0, t2)
     root_node_path.attachNewNode(node)
コード例 #4
0
ファイル: ControlSignalBar.py プロジェクト: JingLu92/pyff
 def _create_frame(self, height, width, thresholds, root_node_path):
     # create surrounding first
     # bottom line
     node, _vdata = create_line(-width/2.0, 0, width/2.0, 0)
     root_node_path.attachNewNode(node)
     # left line
     node, _vdata = create_line(-width/2.0, 0, -width/2.0, height)
     root_node_path.attachNewNode(node)
     # top line
     node, _vdata = create_line(-width/2.0, height, width/2.0, height)
     root_node_path.attachNewNode(node)
     # right line
     node, _vdata = create_line(width/2.0, 0, width/2.0, height)
     root_node_path.attachNewNode(node)
     # create the threshold lines
     t1, t2 = thresholds
     node, self.t1_vdata = create_line(-width/2.0, t1, width/2.0, t1)
     root_node_path.attachNewNode(node)
     node, self.t2_vdata = create_line(-width/2.0, t2, width/2.0, t2)
     root_node_path.attachNewNode(node)