/// <summary> /// 直线命令 /// </summary> public LineAction LineAction(Color?penColor = null, int lineWidth = 1, Color?fill = null, dynamic Element = null) { if (penColor == null) { penColor = Colors.Black; } var a = new LineAction(); a.Geometry.Element = Element; a.Geometry.PenColor = penColor.Value; if (fill != null) { a.Geometry.FillColor = fill.Value; } a.Geometry.LineWidth = lineWidth; DrawingControl.SetAction(a); LastAction = a; return(a); }