GraphicsPath.GetLastPoint メソッド
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As GraphicsPath Dim returnValue As PointF returnValue = instance.GetLastPoint
この GraphicsPath の最後の点を表す PointF。

次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードはパスを作成し、そのパスに直線を追加してから、パスの最後の点を取得します。
Public Sub GetLastPointExample(ByVal e As PaintEventArgs) Dim myPath As New GraphicsPath myPath.AddLine(20, 20, 100, 20) Dim lastPoint As PointF = myPath.GetLastPoint() If lastPoint.IsEmpty = False Then Dim lastPointXString As String = lastPoint.X.ToString() Dim lastPointYString As String = lastPoint.Y.ToString() MessageBox.Show((lastPointXString + ", " + lastPointYString)) Else MessageBox.Show("lastPoint is empty") End If End Sub
private void GetLastPointExample(PaintEventArgs e) { GraphicsPath myPath = new 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(lastPointXString + ", " + lastPointYString); } else MessageBox.Show("lastPoint is empty"); }
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" ); }
private void GetLastPointExample(PaintEventArgs e) { GraphicsPath myPath = new GraphicsPath(); myPath.AddLine(20, 20, 100, 20); PointF lastPoint = myPath.GetLastPoint(); if (lastPoint.get_IsEmpty() == false) { String lastPointXString = System.Convert.ToString( lastPoint.get_X()); String lastPointYString = System.Convert.ToString( lastPoint.get_Y()); MessageBox.Show((lastPointXString + ", " + lastPointYString)); } else { MessageBox.Show("lastPoint is empty"); } } //GetLastPointExample

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGraphicsPath.GetLastPoint メソッドを検索する場合は、下記のリンクをクリックしてください。

- GraphicsPath.GetLastPoint メソッドのページへのリンク