نقشههای IFC
Contents
[
Hide
]صادرات فرمت IFC به PNG
Aspose.CAD برای جاوا به توسعهدهندگان این امکان را میدهد که یک فایل IFC را به PNG صادر کنند. کد زیر نشان میدهد که چگونه به فایل IFC دسترسی پیدا کرده و آن را با استفاده از CadRasterizationOptions و PngOptions به PNG تبدیل کنیم.
کد نمونه
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); | |