GraphicsPath::AddRectangle(constRectF&) , méthode (gdipluspath.h)
La méthode GraphicsPath::AddRectangle ajoute un rectangle à ce chemin.
Syntaxe
Status AddRectangle(
const RectF & rect
);
Paramètres
rect
Référence à un rectangle à ajouter au chemin d’accès.
Valeur retournée
Type:État
Si la méthode réussit, elle retourne Ok, qui est un élément de l’énumération Status .
Si la méthode échoue, elle retourne l’un des autres éléments de l’énumération Status .
Notes
Exemples
L’exemple suivant crée un chemin d’accès d’objet GraphicsPath , ajoute un rectangle au chemin, puis dessine le chemin.
VOID Example_AddRectangle(HDC hdc)
{
Graphics graphics(hdc);
RectF rect(20.0f, 20.0f, 100.0f, 50.0f);
GraphicsPath path;
path.AddRectangle(rect);
// Draw the path.
Pen pen(Color(255, 255, 0, 0));
graphics.DrawPath(&pen, &path);
}
Configuration requise
En-tête | gdipluspath.h |
Voir aussi
Génération et dessin de tracés