plot.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:jvcprojectortools 作者: arvehj 项目源码 文件源码
def label_size(self, label):
        """Calculate label size"""
        font_family, font_size = self.font
        font = Font(family=font_family, size=font_size)
        width = 0
        lines = 0
        for line in label.split('\n'):
            width = max(width, font.measure(line))
            lines += 1
        xscale = turtle.getscreen().xscale
        yscale = turtle.getscreen().yscale
        return width / xscale, font.metrics('linespace') * lines / yscale
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号