Exemplo n.º 1
0
 public Shape(Color color, int thickness, PenStyle penStyle, int x1, int y1, int x2, int y2)
 {
     penThickness  = thickness;
     penColor      = color;
     this.penStyle = penStyle;
     pen           = new Pen(penColor, penThickness);
     pen.DashStyle = dashStyle = penStyle.Style;
     this.x1       = x1;
     this.x2       = x2;
     this.y1       = y1;
     this.y2       = y2;
 }
Exemplo n.º 2
0
 public void ChangePenProperties(Color newColor, int newThickness, PenStyle newPenStyle)
 {
     pen.Color     = penColor = newColor;
     pen.DashStyle = dashStyle = penStyle.Style = newPenStyle.Style;
     pen.Width     = penThickness = newThickness;
 }