marisol.py 文件源码

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

项目:Marisol 作者: wikkiewikkie 项目源码 文件源码
def apply(self, c):
        """
        Apply the redaction to a canvas.

        Args:
            c (Canvas): canvas to apply the redaction to.
        """
        page_width = c._pagesize[0]
        page_height = c._pagesize[1]

        c.setFont("Helvetica", 10)

        c.setStrokeColorRGB(*self.style.stroke)
        c.setFillColorRGB(*self.style.fill)

        c.rect(*self.position+self.size, fill=1)

        if self.text is not None:
            c.setStrokeColorRGB(*self.style.text)
            c.setFillColorRGB(*self.style.text)
            c.drawCentredString(self.center[0], self.center[1], self.text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号