PathResourceConverter Sınıfı
İçindekiler
[
Saklamak
]Summary: Converts PathResource to GraphicsPath and vice versa.
Module: aspose.imaging.fileformats.tiff.pathresources
Full Name: aspose.imaging.fileformats.tiff.pathresources.PathResourceConverter
Methods
| Name | Açıklama |
|---|---|
| from_graphics_path(graphics_path, image_size) | GraphicsPath örneğini yol kaynaklarına dönüştürür. |
| to_graphics_path(path_resources, image_size) | Yol kaynaklarını GraphicsPath örneğine dönüştürür. |
Method: from_graphics_path(graphics_path, image_size) [static]
from_graphics_path(graphics_path, image_size)
GraphicsPath örneğini yol kaynaklarına dönüştürür.
Parameters:
| Parameter | Tür | Açıklama |
|---|---|---|
| graphics_path | GraphicsPath | Grafik yolu. |
| image_size | Size | Resmin boyutu. |
Returns
| Tür | Açıklama |
|---|---|
| PathResource[] | Yol kaynakları. |
Method: to_graphics_path(path_resources, image_size) [static]
to_graphics_path(path_resources, image_size)
Yol kaynaklarını GraphicsPath örneğine dönüştürür.
Parameters:
| Parameter | Tür | Açıklama |
|---|---|---|
| path_resources | PathResource[] | Yol kaynakları. |
| image_size | Size | Resmin boyutu. |
Returns
| Tür | Açıklama |
|---|---|
| GraphicsPath | GraphicsPath örneği. |
Examples
Create Graphics Path from Path Resources in TIFF image.
import aspose.pycore as aspycore
from aspose.imaging import Image, Graphics, Color, Pen
from aspose.imaging.fileformats.tiff import TiffImage
from aspose.imaging.fileformats.tiff.pathresources import PathResourceConverter
with aspycore.as_of(Image.load("Bottle.tif"), TiffImage) as image:
# TIFF görüntüsünden PathResources kullanarak GraphicsPath oluştur.
active_frame = image.active_frame
graphics_path = PathResourceConverter.to_graphics_path(active_frame.path_resource, active_frame.size)
graphics = Graphics(image)
# Kırmızı çizgi çiz ve resmi kaydet
graphics.draw_path(Pen(Color.red, 10), graphics_path)
image.save("BottleWithRedBorder.tif")