freetype_test.py 文件源码

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

项目:Projects 作者: it2school 项目源码 文件源码
def surf_same_image(a, b):
    """Return True if a's pixel buffer is identical to b's"""

    a_sz = a.get_height() * a.get_pitch()
    b_sz = b.get_height() * b.get_pitch()
    if a_sz != b_sz:
        return False
    a_bytes = ctypes.string_at(a._pixels_address, a_sz)
    b_bytes = ctypes.string_at(b._pixels_address, b_sz)
    return a_bytes == b_bytes
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号