Example #1
0
 public override MyGraphic Clone()
 {
     MyRectangle me = new MyRectangle(Height, Width, RadiusX, RadiusY);
     me.isVisible = this.isVisible;
     me.drawmode = this.drawmode;
     return me;
 }
        public override MyGraphic Clone()
        {
            MyRectangle me = new MyRectangle(Height, Width, RadiusX, RadiusY);

            me.isVisible = this.isVisible;
            me.drawmode  = this.drawmode;
            return(me);
        }
Example #3
0
 //画长方形
 private void AddRectangle(Point pt1, Point pt2)
 {
     MyRectangle mr = new MyRectangle();
     mr.Width = Math.Abs(pt1.X - pt2.X);
     mr.Height = Math.Abs(pt1.Y - pt2.Y);
     mr.drawmode = new GeometryMode(brush, pen);
     compositeGraphic.Add(mr, Math.Min(pt1.X, pt2.X), Math.Min(pt1.Y, pt2.Y));
     du_refresh();
     canvas1.ReleaseMouseCapture();
 }