示例#1
0
        /// <summary>
        /// 绘制一个任意多边形
        /// </summary>
        /// <param name="penColor"></param>
        /// <param name="thinkness"></param>
        /// <param name="fill"></param>
        /// <param name="Element"></param>
        /// <returns></returns>
        public PolygonAction PolygonAction(Color?penColor = null, int lineWidth = 1, Color?fill = null, dynamic Element = null)
        {
            if (penColor == null)
            {
                penColor = Colors.Black;
            }
            var a = new PolygonAction();

            a.Geometry.PenColor  = penColor.Value;
            a.Geometry.LineWidth = lineWidth;
            a.Geometry.Element   = Element;
            if (fill != null)
            {
                a.Geometry.FillColor = fill.Value;
            }
            DrawingControl.SetAction(a);
            LastAction = a;
            return(a);
        }
示例#2
0
 private void SetAction(PolygonAction a)
 {
     tip = new SubPolygonTip(DrawingControl, textTip);
     tip.Attention(a);
 }