public UIElement Draw(Canvas element, Tool tool, Point startingPoint, Point currentPoint) { DrawingShapeSetuper shapeSetuper = new DrawingShapeSetuper(); Ellipse ellipse = new Ellipse(); ellipse.Fill = new SolidColorBrush(tool.GetNativeColorObject()); ellipse.Width = shapeSetuper.GetWidthOfShape(startingPoint, currentPoint); ellipse.Height = shapeSetuper.GetHeightOfShape(startingPoint, currentPoint); shapeSetuper.SetUpShape(ellipse, startingPoint, currentPoint); element.Children.Add(ellipse); return ellipse; }
public UIElement Draw(Canvas element, Tool tool, Point startingPoint, Point currentPoint) { FirstUsageAction(startingPoint); Rectangle rubber = new Rectangle(); DrawingShapeSetuper shapeSetuper = new DrawingShapeSetuper(); rubber.Width = 10; rubber.Height = 10; shapeSetuper.SetUpShape(rubber, _previousPoint, currentPoint); rubber.Fill = new SolidColorBrush(Color.FromRgb(255,255,255)); element.Children.Add(rubber); _previousPoint = currentPoint; return rubber; }