Hi Oriane,
Thank you for your reply!
...The p object is not empty and filled with these points: Points
{29,61;62,94 35,5;62,94 35,5;57,1 29,61;57,1}.
You may try the following code snippet to see if the problem can be solved:
PathGeometry pathGeo = new PathGeometry();
PathFigure pathFigure = new PathFigure();
PolyLineSegment seg = new PolyLineSegment();
PointCollection ponts = new
PointCollectionConverter().ConvertFromString("62,94 35,5 62,94 35,5 57,1
29,61 57,1") as PointCollection;
seg.Points = ponts;
pathFigure.StartPoint = new Point(29, 61);
pathFigure.Segments.Add(seg);
pathGeo.Figures.Add(pathFigure);
bool r =pathGeo.FillContains(new Point(-10, -10));
r = pathGeo.FillContains(new Point(0, 0));
Hope this helps.
Sincerely,
Linda Liu
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
This posting is provided "AS IS" with no warranties, and confers no rights.