แบบแผน IFC
Contents
[
Hide
]การส่งออกฟอร์แมต IFC ไปยัง PNG
Aspose.CAD สำหรับ Java อนุญาตให้นักพัฒนาส่งออกไฟล์ IFC ไปยัง PNG โค้ดด้านล่างแสดงวิธีการเข้าถึงไฟล์ IFC และแปลงเป็น PNG โดยใช้ CadRasterizationOptions และ PngOptions.
โค้ดตัวอย่าง
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String fileName = dataDir +"example.ifc"; | |
IfcImage cadImage = (IfcImage)Image.load(fileName); | |
CadRasterizationOptions vectorOptions = new CadRasterizationOptions(); | |
vectorOptions.setPageWidth(1500); | |
vectorOptions.setPageHeight(1500); | |
PngOptions pngOptions = new PngOptions(); | |
pngOptions.setVectorRasterizationOptions(vectorOptions); | |
String outPath = dataDir + "example.png"; | |
cadImage.save(dataDir, pngOptions); | |