Navigation
Artikel
Stuff
RSS Feeds
|
Sourcecodes - [C#] Einen Pfeil zeichnenSprachenübersicht/C / C++/ C#/Grafik Keywords: arrow, pfeil zeichen, draw, c# Mit der folgenden Funktion kann man einen Pfeil zeichnen lassen:
Code: private void DrawArrow(System.Windows.Forms.PaintEventArgs e, System.Drawing.Pen brushes_Brush, int int_StartPointX, int int_StartPointY, int int_Width, int int_PenX, int int_PenY, int int_PeakX, int int_PeakY, int int_Different) { Graphics graphics_Device = e.Graphics; //Draws the Line graphics_Device.DrawLine(brushes_Brush, int_StartPointX,int_StartPointY, int_StartPointX + int_Width /2, int_StartPointY); //Draws the top of the peak graphics_Device.DrawLine(brushes_Brush, int_StartPointX + int_Width/2, int_StartPointY, int_StartPointX + int_Width/2 - int_PeakX, int_StartPointY - int_PeakY); //Draws the bottom of the peak graphics_Device.DrawLine(brushes_Brush, int_StartPointX + int_Width/2, int_StartPointY, int_StartPointX + int_Width/2 - int_PeakX, int_StartPointY + int_PeakY); //Draws the Y of the peak graphics_Device.DrawLine(brushes_Brush, int_StartPointX + int_Width/2 - int_PeakX, int_StartPointY - int_PeakY, int_StartPointX + int_Width/2 - int_PeakX, int_StartPointY + int_PeakY); for(int i = 0; i < 4; i++) { //Draws the top part of the pen graphics_Device.DrawLine(brushes_Brush, int_StartPointX + int_Different * i, int_StartPointY, int_StartPointX + int_Different *i - int_PenX, int_StartPointY - int_PenY); //Draws the bottom part of the pen graphics_Device.DrawLine(brushes_Brush, int_StartPointX + int_Different * i, int_StartPointY, int_StartPointX + int_Different *i - int_PenX, int_StartPointY + int_PenY); } Gibt es noch irgendwelche Fragen, oder wollen Sie über den Artikel diskutieren? Sprachenübersicht/C / C++/ C#/Grafik/[C#] Einen Pfeil zeichnen |