שינוי קנה המידה של קווים ב-SVG

שנה את קנה המידה של הקווים בעת ייצוא ל-SVG

אתה יכול לשלוט בקנה המידה של הקווים בקובץ SVG, ספריית Aspose.CAD מספקת את כל הכלים הנדרשים לכך.

השתמש בפרמטר LineScale ב-VectorRasterizationOptions כדי לשלוט בקנה המידה של הקווים

קוד דוגמה:

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);
}

קובץ המשתמש בקנה מידה ליניארי

  1. הקובץ אם הפרמטר LineScale מוגדר ל-0.25.
    Input image
  2. קובץ אם אינך משתמש בקנה מידה לקווים.
    Input image