GraphicCommons.py 文件源码

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

项目:beremiz 作者: nucleron 项目源码 文件源码
def GetMinSize(self):
        dc = wx.ClientDC(self.Parent)
        min_width = 0
        min_height = 0
        # The comment minimum size is the maximum size of words in the content
        for line in self.Content.splitlines():
            for word in line.split(" "):
                wordwidth, wordheight = dc.GetTextExtent(word)
                min_width = max(min_width, wordwidth)
                min_height = max(min_height, wordheight)
        return min_width + 20, min_height + 20

    # Changes the comment position
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号