Rasterizer

개요

Rasterizer은 Aspose.Font FOSS에서 Python을 위해 제공되는 클래스입니다.

GlyphPath 윤곽선을 위한 스캔라인 래스터라이저, 순수-Python PNG 내보내기 지원.

이 클래스는 Python 프로그램에서 Rasterizer 객체를 다루기 위한 5개의 메서드를 제공합니다. 사용 가능한 메서드: __init__, clear, close_contour, draw_path, to_png. 모든 공개 멤버는 Aspose.Font FOSS for Python 패키지를 설치한 후 any Python 애플리케이션에서 접근할 수 있습니다. 속성: curve_tolerance, height, width.

속성

이름유형액세스설명
curve_tolerancefloat읽기곡선 허용오차를 가져옵니다.
width``읽기폭을 가져옵니다.
height``읽기높이를 가져옵니다.

메서드

시그니처설명
__init__(width: int, height: int, background: tuple[int, int, int])Calls init 이 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()현재 래스터화 중인 컨투어를 완료합니다

참조

 한국어