本文整理汇总了Python中KicadModTree.nodes.Node.Node._getRenderTreeText方法的典型用法代码示例。如果您正苦于以下问题:Python Node._getRenderTreeText方法的具体用法?Python Node._getRenderTreeText怎么用?Python Node._getRenderTreeText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KicadModTree.nodes.Node.Node
的用法示例。
在下文中一共展示了Node._getRenderTreeText方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_text += " [start: [x: {sx}, y: {sy}] end: [x: {ex}, y: {ey}]]".format(sx=self.start_pos.x,
sy=self.start_pos.y,
ex=self.end_pos.x,
ey=self.end_pos.y)
return render_text
示例2: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_string = ['start: [x: {sx}, y: {sy}]'.format(sx=self.start_pos.x, sy=self.start_pos.y),
'end: [x: {ex}, y: {ey}]'.format(ex=self.end_pos.x, ey=self.end_pos.y)]
render_text += " [{}]".format(", ".join(render_string))
return render_text
示例3: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_strings = ['fp_line']
render_strings.append(self.start_pos.render('(start {x} {y})'))
render_strings.append(self.end_pos.render('(end {x} {y})'))
render_strings.append('(layer {layer})'.format(layer=self.layer))
render_strings.append('(width {width})'.format(width=self.width))
render_text = Node._getRenderTreeText(self)
render_text += ' ({})'.format(' '.join(render_strings))
return render_text
示例4: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_string = ['filename: {filename}'.format(filename=self.filename),
'at: {at}'.format(at=self.at.render('(xyz {x} {y} {z})')),
'scale: {scale}'.format(scale=self.scale.render('(xyz {x} {y} {z})')),
'rotate: {rotate}'.format(rotate=self.rotate.render('(xyz {x} {y} {z})'))]
render_text += " [{}]".format(", ".join(render_string))
return render_text
示例5: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_strings = ['fp_arc']
render_strings.append(self.center_pos.render('(center {x} {y})'))
render_strings.append(self.start_pos.render('(start {x} {y})'))
render_strings.append('(angle {angle})'.format(angle=self.angle))
render_strings.append('(layer {layer})'.format(layer=self.layer))
render_strings.append('(width {width})'.format(width=self.width))
render_text = Node._getRenderTreeText(self)
render_text += ' ({})'.format(' '.join(render_strings))
return render_text
示例6: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_string = ['type: "{}"'.format(self.type),
'text: "{}"'.format(self.text),
'at: {}'.format(self.at.render('(at {x} {y})')),
'layer: {}'.format(self.layer),
'size: {}'.format(self.size.render('(size {x} {y})')),
'thickness: {}'.format(self.thickness)]
render_text += " [{}]".format(", ".join(render_string))
return render_text
示例7: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_strings = ['pad']
render_strings.append(lispString(self.number))
render_strings.append(lispString(self.type))
render_strings.append(lispString(self.shape))
render_strings.append(self.at.render('(at {x} {y})'))
render_strings.append(self.size.render('(size {x} {y})'))
render_strings.append('(drill {})'.format(self.drill))
render_strings.append('(layers {})'.format(' '.join(self.layers)))
render_text = Node._getRenderTreeText(self)
render_text += '({})'.format(' '.join(render_strings))
return render_text
示例8: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_text += " [nodes: ["
node_strings = []
for n in self.nodes:
node_strings.append("[x: {x}, y: {y}]".format(x=n.x, y=n.y))
if len(node_strings) <= 6:
render_text += ", ".join(node_strings)
else:
# display only a few nodes of the beginning and the end of the polygone line
render_text += ", ".join(node_strings[:3])
render_text += ",... , "
render_text += ", ".join(node_strings[-3:])
render_text += "]"
return render_text
示例9: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_text += " [r: {r}]".format(r=self.rotation)
return render_text
示例10: _getRenderTreeText
# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import _getRenderTreeText [as 别名]
def _getRenderTreeText(self):
render_text = Node._getRenderTreeText(self)
render_text += " [x: {x}, y: {y}]".format(x=self.offset_x,
y=self.offset_y)
return render_text