Maßstabslinien in SVG skalieren
Contents
[
Hide
]Ändern des Linienmaßstabs beim Exportieren nach SVG
Sie können den Maßstab der Linien in der SVG-Datei steuern. Die Aspose.CAD-Bibliothek bietet alle erforderlichen Tools dafür.
Verwenden Sie den Parameter LineScale in VectorRasterizationOptions, um den Maßstab der Linien zu steuern
Beispielcode:
This file contains 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 = "exampleFile"; | |
string file = string.Format("{0}.plt", fileName); | |
string outFile = string.Format("{0}.svg", fileName); | |
using (FileStream inStream = new FileStream(file, FileMode.Open)) | |
using (Image image = Image.Load(inStream)) | |
using (FileStream stream = new FileStream(outFile, FileMode.Create)) | |
{ | |
ImageOptionsBase options = new SvgOptions(); | |
options.VectorRasterizationOptions = new CadRasterizationOptions | |
{ | |
LineScale = 0.25f | |
}; | |
image.Save(stream, options); | |
} |
Eine Datei mit linearer Skalierung
- Die Datei, wenn der Parameter LineScale auf 0,25 festgelegt ist.
- Datei, wenn Sie keine Linien Skalierung verwenden.