当前位置: 首页>>代码示例>>Python>>正文


Python Node._getRenderTreeText方法代码示例

本文整理汇总了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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:10,代码来源:RectLine.py

示例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
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:11,代码来源:FilledRect.py

示例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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:13,代码来源:Line.py

示例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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:13,代码来源:Model.py

示例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
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:14,代码来源:Arc.py

示例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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:15,代码来源:Text.py

示例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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:16,代码来源:Pad.py

示例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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:21,代码来源:Polygon.py

示例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
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:7,代码来源:Rotation.py

示例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
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:8,代码来源:Translation.py


注:本文中的KicadModTree.nodes.Node.Node._getRenderTreeText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。