Skalowanie linii w SVG
Contents
[
Hide
]Zmień skalę linii podczas eksportu do SVG
Możesz kontrolować skalę linii w pliku SVG, biblioteka Aspose.CAD zapewnia wszystkie niezbędne narzędzia do tego.
Użyj parametru LineScale w VectorRasterizationOptions, aby kontrolować skalę linii
Przykład kodu:
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); | |
} |
Plik używający skali liniowej
- Plik, jeśli parametr LineScale jest ustawiony na 0.25.
- Plik, jeśli nie używasz skalowania linii.