Graphics::D rawBezier(constPen*,constPointF&,constPointF&,constPointF&,constPointF&)-Methode (gdiplusgraphics.h)
Die Graphics::D rawBezier-Methode zeichnet eine Bézier-Spline.
Syntax
Status DrawBezier(
[in] const Pen *pen,
[in, ref] const PointF & pt1,
[in, ref] const PointF & pt2,
[in, ref] const PointF & pt3,
[in, ref] const PointF & pt4
);
Parameter
[in] pen
Typ: const Pen*
Zeiger auf einen Stift, der zum Zeichnen der Bézier-Spline verwendet wird.
[in, ref] pt1
Typ: const POINTF
Verweis auf den Ausgangspunkt der Bézier-Spline.
[in, ref] pt2
Typ: const POINTF
Verweis auf den ersten Kontrollpunkt der Bézier-Spline.
[in, ref] pt3
Typ: const POINTF
Verweis auf den zweiten Kontrollpunkt der Bézier-Spline.
[in, ref] pt4
Typ: const POINTF
Verweis auf den Endpunkt der Bézier-Spline.
Rückgabewert
Typ: Status
Wenn die Methode erfolgreich ist, gibt sie OK zurück, ein Element der Status-Enumeration .
Wenn die Methode fehlschlägt, wird eines der anderen Elemente der Status-Enumeration zurückgegeben.
Hinweise
Eine Bézier-Spline durchläuft ihre Kontrollpunkte nicht. Die Kontrollpunkte fungieren als Magnete und ziehen die Kurve in bestimmte Richtungen, um die Art und Weise zu beeinflussen, wie sich die Bézier-Spline biegt.
Beispiele
Das folgende Beispiel zeichnet eine Bézierkurve.
VOID Example_DrawBezier2(HDC hdc)
{
Graphics graphics(hdc);
// Set up the pen and curve points.
Pen greenPen(Color(255, 0, 255, 0));
PointF startPoint(100.0f, 100.0f);
PointF controlPoint1(200.0f, 10.0f);
PointF controlPoint2(350.0f, 50.0f);
PointF endPoint(500.0f, 100.0f);
//Draw the curve.
graphics.DrawBezier(&greenPen, startPoint, controlPoint1, controlPoint2, endPoint);
//Draw the end points and control points.
SolidBrush redBrush(Color(255, 255, 0, 0));
SolidBrush blueBrush(Color(255, 0, 0, 255));
graphics.FillEllipse(&redBrush, 100 - 5, 100 - 5, 10, 10);
graphics.FillEllipse(&redBrush, 500 - 5, 100 - 5, 10, 10);
graphics.FillEllipse(&blueBrush, 200 - 5, 10 - 5, 10, 10);
graphics.FillEllipse(&blueBrush, 350 - 5, 50 - 5, 10, 10);
}
Anforderungen
Anforderung | Wert |
---|---|
Unterstützte Mindestversion (Client) | Windows XP, Windows 2000 Professional [nur Desktop-Apps] |
Unterstützte Mindestversion (Server) | Windows 2000 Server [nur Desktop-Apps] |
Zielplattform | Windows |
Kopfzeile | gdiplusgraphics.h (include Gdiplus.h) |
Bibliothek | Gdiplus.lib |
DLL | Gdiplus.dll |
Weitere Informationen
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für