Exemplo n.º 1
0
 public MyShape(MyShape _myShape)
 {
     penAttr     = new PenAttr(_myShape.penAttr);
     points      = new List <Point>(_myShape.points);
     angleRotate = _myShape.angleRotate;
     tyleScale   = _myShape.tyleScale;
 }
Exemplo 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);
 }
Exemplo n.º 3
0
 public MyShape(PenAttr _penAttr, List <Point> _points)
 {
     penAttr     = _penAttr;
     points      = new List <Point>(_points);
     angleRotate = 0;
     tyleScale   = new SizeF(1, 1);
 }
Exemplo 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);
        }
Exemplo n.º 5
0
 public MyArc(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
     calcBound();
 }
Exemplo n.º 6
0
 public override void updatePenAttr(PenAttr _penAttr)
 {
     penAttr = _penAttr;
 }
Exemplo n.º 7
0
 public MyEllipse(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
     calcMostLeftWidthHeight();
     brushAttr = new BrushAttr(COLOR_BRUSH_DEFAULT, "SolidBrush");
 }
Exemplo n.º 8
0
 public MyParallelogram(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
     brushAttr = new BrushAttr(COLOR_BRUSH_DEFAULT, "SolidBrush");
 }
Exemplo n.º 9
0
 public MyLine(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
 }
Exemplo n.º 10
0
 public PenAttr(PenAttr penAttr)
 {
     color     = penAttr.color;
     dashStyle = penAttr.dashStyle;
     width     = penAttr.width;
 }
Exemplo n.º 11
0
 public MyBezier(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
 }
Exemplo n.º 12
0
 public virtual void updatePenAttr(PenAttr _penAttr)
 {
 }
Exemplo n.º 13
0
 public MyParabol(PenAttr _penAttr, List <Point> _points) :
     base(_penAttr, _points)
 {
 }