GraphicsPath::GetLastPoint Method ()
.NET Framework (current version)
Gets the last point in the PathPoints array of this GraphicsPath.
Assembly: System.Drawing (in System.Drawing.dll)
Return Value
Type: System.Drawing::PointFA PointF that represents the last point in this GraphicsPath.
The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, an OnPaint event object. The code creates a path, adds a line to the path, and then gets the last point in the path.
private: void GetLastPointExample( PaintEventArgs^ /*e*/ ) { GraphicsPath^ myPath = gcnew GraphicsPath; myPath->AddLine( 20, 20, 100, 20 ); PointF lastPoint = myPath->GetLastPoint(); if ( lastPoint.IsEmpty == false ) { String^ lastPointXString = lastPoint.X.ToString(); String^ lastPointYString = lastPoint.Y.ToString(); MessageBox::Show( String::Concat( lastPointXString, ", ", lastPointYString ) ); } else MessageBox::Show( "lastPoint is empty" ); }
.NET Framework
Available since 1.1
Available since 1.1
Show: