private void picture_MouseClick(object sender, MouseEventArgs e) { if (creator != null) { if (creator.mouseClick) { if (e.Button == MouseButtons.Left) { startPoint.X = e.X; startPoint.Y = e.Y; if (!drawing) { figyru = creator.GetFigyru(penThickness, penColor, fillColor); points.Clear(); points.Add(startPoint); points.Add(startPoint); drawing = !drawing; } else { points.Add(startPoint); } } else if (e.Button == MouseButtons.Right) { drawing = !drawing; listFigure.Add(figyru); figureStack.CleanStack(); } } } }
public Figyru Remove() { Figyru temp = figureList.Last(); figureList.Remove(figureList.Last()); return(temp); }
private void picture_MouseDown(object sender, MouseEventArgs e) { if (creator != null) { if (!drawing && !creator.mouseClick) { figyru = creator.GetFigyru(penThickness, penColor, fillColor); if (creator.corners) { (figyru as Polygon).numOfCorners = numOfCorners; } drawing = !drawing; startPoint.X = e.X; startPoint.Y = e.Y; points.Clear(); points.Add(startPoint); points.Add(startPoint); } } }
public void Push(Figyru figyru) { figureStack.Push(figyru); }
public void Add(Figyru figyru) { figureList.Add(figyru); }