ציין מצב רינדור עבור קבצי DWG ו-DXF
Contents
[
Hide
]איך לציין מצב רינדור עבור קבצי DWG ו-DXF
בעיה: איך לציין מצב רינדור עבור קבצי DWG ו-DXF.
טיפים: לשם כך, אתה יכול לשנות את פרמטר VisibilityMode באפשרויות הרסטריזציה.
הערה: רינדור כפי שמוצג על ידי AutoCAD או כפי מודפס על ידי AutoCAD, בדוק את הקטע ואת הקבצים המצורפים AsPrint.png ו-AsScreen.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
using CadImage cadImage = (CadImage)Image.Load(GetPath("file.dwg")); | |
// AsPrint | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor; | |
rasterizationOptions.PageHeight = 2000; | |
rasterizationOptions.PageWidth = 2000; | |
rasterizationOptions.VisibilityMode = VisibilityMode.AsPrint; | |
string outPath = InputOutputManager.GetFileInOutputFolder(fileName + "_asPrint.pdf"); | |
PdfOptions pdfOptions = new PdfOptions { VectorRasterizationOptions = rasterizationOptions }; | |
cadImage.Save(outPath, pdfOptions); | |
// AsScreen | |
CadRasterizationOptions rasterizationOptions1 = new CadRasterizationOptions(); | |
rasterizationOptions1.DrawType = CadDrawTypeMode.UseObjectColor; | |
rasterizationOptions1.PageHeight = 2000; | |
rasterizationOptions1.PageWidth = 2000; | |
rasterizationOptions1.VisibilityMode = VisibilityMode.AsScreen; | |
PdfOptions pdfOptions1 = new PdfOptions { VectorRasterizationOptions = rasterizationOptions1 }; | |
string outPath1 = InputOutputManager.GetFileInOutputFolder(fileName + "_asScreen.pdf"); | |
cadImage.Save(outPath1, pdfOptions1); |