コード例 #1
0
        /// <summary>
        /// 绘制矩形
        /// </summary>
        /// <param name="g"></param>
        public virtual void Draw(Graphics g)
        {
            Pen pen = new Pen(Color.Black);

            g.DrawRectangle(pen, DrawRectangle.GetNormalizedRectangle(Rectangle));
            DrawTracker(g);

            pen.Dispose();
        }
コード例 #2
0
 /// <summary>
 /// 规格化矩形,在对象改变大小的之后调用
 /// </summary>
 public virtual void Normalize()
 {
     rectangle = DrawRectangle.GetNormalizedRectangle(rectangle);
 }