quizcards.py 文件源码

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

项目:pandas-100 作者: deeplook 项目源码 文件源码
def fits(self, flowables):
        story = flowables
        self.resize_images(story)

        W, H = (
            self.width - self.lm - self.rm), self.height - self.tm - self.bm
        canv = Canvas(io.StringIO(), (W, H))
        total_height = sum([el.wrapOn(canv, W, 0)[1] + bt.spaceBefore
                            for el in story])
        if getattr(self, "verbose", False) == True:
            print("***", total_height / mm, H / mm, \
                [txt.text[:5] for txt in story])
        return total_height < H
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号