Beispiel #1
0
 /// <summary>
 /// Left nouse button is pressed
 /// </summary>
 /// <param name="drawArea"></param>
 /// <param name="e"></param>
 public override void OnMouseDown(IToolDrawArea drawArea, MouseEventArgs e)
 {
     var property = new PencilProperty();
     property.InitProperty();
     property.AddPoint(new Point(e.X, e.Y));
     property.AddPoint(new Point(e.X + 1, e.Y + 1));
     draw = new DrawPencil(property);
     drawArea.AddNewDrawObject(draw);
     lastX = e.X;
     lastY = e.Y;
 }
Beispiel #2
0
 public override IDrawObject CreateDrawObject(PageControl control)
 {
     var property = new PencilProperty();
     InitDrawObjectFromPageControl(control, property);
     return new DrawPencil(property);
 }
Beispiel #3
0
 public DrawPencil(PencilProperty property)
     : base(property)
 {
 }