Rasterizer

Overview

Rasterizer 是Python的Aspose.Font FOSS中的一个类.

扫描线对 GlyphPath 的轮进行分离,并使用纯 Python PNG 出口.

这个类提供了在Python程序中与Rasterizer对象工作的5种方法. 有的方法包括: __init__, clear, close_contour, draw_path, to_png. 在安装Python包的Aspose.Font FOSS后,所有公众成员都可以访问任何 Python 应用程序. 特性: curve_tolerance, height, width.

Properties

NameTypeAccessDescription
curve_tolerancefloatRead得到曲线宽容度.
width``Read得到宽度.
height``Read得到了高度.

Methods

SignatureDescription
__init__(width: int, height: int, background: tuple[int, int, int])Calls 开始 在这个Rasterizer实例上.
`clear(color: tuple[int, int, int]None)`
`draw_path(path: GlyphPath, color: tuple[int, int, int], transform: tuple[float, …]None)`
to_png()bytes编码当前的RGB缓冲为8位PNG (IHDR+IDAT + IEND).
close_contour()完成当前轮的雷斯特化

See Also

 中文