FontPreviewBuilder

FontPreviewBuilder

Przegląd

FontPreviewBuilder jest klasą w Aspose.Font FOSS dla Python.

FontPreviewBuilder.build(font, text, size, color, background, padding, antialias, file_stem, instance_coordinates, instance_name, output_format) generuje PreviewImage (PNG lub SVG) dostarczonego tekstu renderowanego przy użyciu podanej czcionki.

Ta klasa udostępnia 4 metody do pracy z obiektami FontPreviewBuilder w programach Python. Dostępne metody obejmują: build, compose_difference_preview, compose_overlay_preview, compose_sheet. Wszystkie publiczne elementy są dostępne dla każdej aplikacji Python po zainstalowaniu pakietu Aspose.Font FOSS dla Python.

Metody

SygnaturaOpis
`build(font: Font, text: str, size: float, color: tuple[int, int, int], background: tuple[int, int, int], padding: int, antialias: bool, file_stem: strNone, instance_coordinates: dict[str, float]
`compose_sheet(previews: list[PreviewImage], columns: int, gap: int, background: tuple[int, int, int], title: strNone, column_headers: list[str]
compose_difference_preview(before: PreviewImage, after: PreviewImage, file_stem: str, background: tuple[int, int, int], before_color: tuple[int, int, int], after_color: tuple[int, int, int], overlap_color: tuple[int, int, int], threshold: int) → PreviewImageGeneruje PreviewImage, które wizualizuje różnice między obrazami przed i po, używając określonych kolorów i progu
compose_overlay_preview(before: PreviewImage, after: PreviewImage, file_stem: str, background: tuple[int, int, int], before_color: tuple[int, int, int], after_color: tuple[int, int, int], overlap_color: tuple[int, int, int], threshold: int) → PreviewImageTworzy PreviewImage nakładające obrazy przed i po przy użyciu podanych kolorów i progu

Zobacz także

 Polski