مقیاس خطوط در SVG
Contents
[
Hide
]تغییر مقیاس خط هنگام خروجی به SVG
شما میتوانید مقیاس خطوط در فایل SVG را کنترل کنید، کتابخانه Aspose.CAD همه ابزارهای لازم برای این کار را فراهم میکند.
استفاده از پارامتر LineScale در VectorRasterizationOptions برای کنترل مقیاس خطوط
کد نمونه:
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); | |
} |
فایلی با مقیاس خطی
- فایل اگر پارامتر LineScale روی 0.25 تنظیم شود.
- فایلی اگر از مقیاس خط استفاده نکنید.