1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
double x1,y1,x2,y2 //leur valeurs sont recuperées avant cette partie
PathFigure pf = new PathFigure();
Point pp = new Point();
pp=new Point(x1,y1);
pf.StartPoint = pp;
QuadraticBezierSegment bz = new QuadraticBezierSegment();
pp=new Point(x2,y2);
bz.Point2 = pp;
pp=new Point((x1+x2)/2,(y1+y2)-2); //point de controle
bz.Point1 = pp;
pf.Segments.Add(bz);
pg.Figures.Add(lis[lis.Count - 1]);
p1.Data = pg;
Polygon po = new Polygon();
....//coordonnées de la fleche
canvas1.Children.Add(po); |
Partager