Aspose.CAD NET 100035663.zip (192.3 KB)
VER 22.1.0 ,将DWG 文件输出成WMF文件后,文字和线条变粗,特别是文字。
代码如下:
…………
var rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions()
{
PageSize = new Aspose.CAD.SizeF(400 * 3, 300 * 3),
AutomaticLayoutsScaling = false,
NoScaling = false,
DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor,
UnitType = Aspose.CAD.ImageOptions.UnitType.Unitless,
};
rasterizationOptions.PenOptions = new PenOptions() { StartCap = LineCap.Square, EndCap = LineCap.Square };
rasterizationOptions.GraphicsOptions.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
rasterizationOptions.GraphicsOptions.SmoothingMode = Aspose.CAD.SmoothingMode.HighQuality;
rasterizationOptions.GraphicsOptions.InterpolationMode = Aspose.CAD.InterpolationMode.HighQualityBicubic;
outFileName = @"C:\\graphfile\\tmp\\" + fileName + ".wmf";
img.Save(outFileName, new Aspose.CAD.ImageOptions.WmfOptions() { VectorRasterizationOptions = rasterizationOptions });