background.py 文件源码

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

项目:ghostlines-robofont 作者: ghostlines 项目源码 文件源码
def __init__(self, dimensions, alpha=1):
        super(Background, self).__init__(dimensions, scale="fit")

        colorTile = NSImage.alloc().initWithSize_((10, 10))
        colorTile.lockFocus()
        color = NSColor.colorWithCalibratedWhite_alpha_(0, alpha)
        color.set()
        NSRectFillUsingOperation(((0, 0), (10, 10)), NSCompositeSourceOver)
        colorTile.unlockFocus()

        self.setImage(imageObject=colorTile)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号