我已经经历了几次,无法弄清楚。DrawPath 方法抛出 System.OutOfMemoryException。
我已经看到 pen.DashPattern 实际上也抛出了 System.OutOfMemoryException,所以我设置了破折号模式,但更正它并不能防止错误。
using (var pen = new Pen(Color.Black,1.0f))
{
pen.DashPattern = new[]{1.0f};
pen.Transform = context.ReverseTransform;
try
{
using (var temporaryPath = new GraphicsPath(path.PathPoints, path.PathTypes))
{
context.Graphics.DrawPath(pen, temporaryPath);
}
}
}
在这里的任何帮助都会很可爱!提前致谢!