Hey,
I'm writing a small paint-like app.
Using the following code I allow the client to use the "pen" object:
_geometry = new PathGeometry();
_figure = new PathFigure();
_path = new Path();
_geometry.Figures.Add(_figure);
_path.Data = _geometry;
_path.StrokeThickness = 4;
_path.Stroke = new SolidColorBrush(Colors.Red);
_path.Stretch = Stretch.UniformToFill;
_figure.StartPoint = e.MouseDevice.GetPosition(this);
_segment = new PolyLineSegment();
_figure.Segments.Add(_segment);
grdControls.Children.Add(_path);
And I add points on the MouseMove event using:
_segment.Points.Add(e.MouseDevice.GetPosition(this));
My question is, how can I know if the shape created by _path is
closed.
What is closed? en example a square or a circle with no holes in it.
How can I do it?
Thanks ahead
--sternr