Bonjour, je souhaite dessiner un rectangle a l'aide de 2 points.
Voici mon code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
Rectangle rect = new Rectangle((Point)points[index], (Size)Size);
 
rect.Size = new Size(((Point)xpoints[index + 1] - (Point)xpoints[index]), 
((Point)ypoints[index + 1] - (Point)ypoints[index]));
 
graphicsObject.DrawRectangle(pen, rect);
J'ai une erreur

Error 1 Operator '-' cannot be applied to operands of type 'System.Drawing.Point' and 'System.Drawing.Point' D:\Documents and Settings\Jérôme\Bureau\Test TekenProgramma\TekenProgramma\TekenProgramma\Form1.cs 113 43 TekenProgramma
Une astuce?