Esempio n. 1
0
 public MyShape(MyShape _myShape)
 {
     penAttr     = new PenAttr(_myShape.penAttr);
     points      = new List <Point>(_myShape.points);
     angleRotate = _myShape.angleRotate;
     tyleScale   = _myShape.tyleScale;
 }
Esempio n. 2
0
 public MyShape(List <Point> _points)
 {
     penAttr     = new PenAttr(COLOR_PEN_DEFAULT, DashStyle.Solid, 1);
     points      = new List <Point>(_points);
     angleRotate = 0;
     tyleScale   = new SizeF(1, 1);
 }
Esempio n. 3
0
 public MyShape(PenAttr _penAttr, List <Point> _points)
 {
     penAttr     = _penAttr;
     points      = new List <Point>(_points);
     angleRotate = 0;
     tyleScale   = new SizeF(1, 1);
 }
Esempio n. 4
0
        private PenAttr getPenAttr()
        {
            PenAttr penAttr = null;

            switch (comboBoxDashStyle.SelectedItem.ToString())
            {
            case "Dash":
                penAttr = new PenAttr(colorDialog1.Color, DashStyle.Dash,
                                      Convert.ToInt32(Math.Round(numericUpDownPenWidth.Value, 0)));
                break;

            case "DashDot":
                penAttr = new PenAttr(colorDialog1.Color, DashStyle.DashDot,
                                      Convert.ToInt32(Math.Round(numericUpDownPenWidth.Value, 0)));
                break;

            case "DashDotDot":
                penAttr = new PenAttr(colorDialog1.Color, DashStyle.DashDotDot,
                                      Convert.ToInt32(Math.Round(numericUpDownPenWidth.Value, 0)));
                break;

            case "Dot":
                penAttr = new PenAttr(colorDialog1.Color, DashStyle.Dot,
                                      Convert.ToInt32(Math.Round(numericUpDownPenWidth.Value, 0)));
                break;

            case "Solid":
                penAttr = new PenAttr(colorDialog1.Color, DashStyle.Solid,
                                      Convert.ToInt32(Math.Round(numericUpDownPenWidth.Value, 0)));
                break;

            default:
                break;
            }
            return(penAttr);
        }
Esempio n. 5
0
 public MyArc(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
     calcBound();
 }
Esempio n. 6
0
 public override void updatePenAttr(PenAttr _penAttr)
 {
     penAttr = _penAttr;
 }
Esempio n. 7
0
 public MyEllipse(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
     calcMostLeftWidthHeight();
     brushAttr = new BrushAttr(COLOR_BRUSH_DEFAULT, "SolidBrush");
 }
Esempio n. 8
0
 public MyParallelogram(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
     brushAttr = new BrushAttr(COLOR_BRUSH_DEFAULT, "SolidBrush");
 }
Esempio n. 9
0
 public MyLine(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
 }
Esempio n. 10
0
 public PenAttr(PenAttr penAttr)
 {
     color     = penAttr.color;
     dashStyle = penAttr.dashStyle;
     width     = penAttr.width;
 }
Esempio n. 11
0
 public MyBezier(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
 }
Esempio n. 12
0
 public virtual void updatePenAttr(PenAttr _penAttr)
 {
 }
Esempio n. 13
0
 public MyParabol(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
 }