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


このメソッドは、この GraphicsPath の元の線の周りにアウトラインを作成します。既存の線と新しいアウトライン間の距離として、Widen の呼び出し時に使用される Pen の幅が使用されます。線の間の空間を塗りつぶす場合は、DrawPath ではなく FillPath を使用する必要があります。


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.Widen メソッド (Pen, Matrix, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As GraphicsPath Dim pen As Pen Dim matrix As Matrix Dim flatness As Single instance.Widen(pen, matrix, flatness)

このメソッドは、この GraphicsPath の元の線の周りにアウトラインを作成します。既存の線と新しいアウトライン間の距離として、Widen の呼び出し時に使用される Pen の幅が使用されます。線の間の空間を塗りつぶす場合は、DrawPath ではなく FillPath を使用する必要があります。

次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
2 番目の描画では DrawPath ではなく FillPath が使用されるため、描画された図形はアウトラインが塗りつぶされます。
Public Sub WidenExample(ByVal e As PaintEventArgs) Dim myPath As New GraphicsPath myPath.AddEllipse(0, 0, 100, 100) myPath.AddEllipse(100, 0, 100, 100) e.Graphics.DrawPath(Pens.Black, myPath) Dim widenPen As New Pen(Color.Black, 10) Dim widenMatrix As New Matrix widenMatrix.Translate(50, 50) myPath.Widen(widenPen, widenMatrix, 1.0F) ' Sets tension for curves. e.Graphics.FillPath(New SolidBrush(Color.Red), myPath) End Sub
private void WidenExample(PaintEventArgs e) { // Create a path and add two ellipses. GraphicsPath myPath = new GraphicsPath(); myPath.AddEllipse(0, 0, 100, 100); myPath.AddEllipse(100, 0, 100, 100); // Draw the original ellipses to the screen in black. e.Graphics.DrawPath(Pens.Black, myPath); // Widen the path. Pen widenPen = new Pen(Color.Black, 10); Matrix widenMatrix = new Matrix(); widenMatrix.Translate(50, 50); myPath.Widen(widenPen, widenMatrix, 1.0f); // Draw the widened path to the screen in red. e.Graphics.FillPath(new SolidBrush(Color.Red), myPath); }
private: void WidenExample( PaintEventArgs^ e ) { // Create a path and add two ellipses. GraphicsPath^ myPath = gcnew GraphicsPath; myPath->AddEllipse( 0, 0, 100, 100 ); myPath->AddEllipse( 100, 0, 100, 100 ); // Draw the original ellipses to the screen in black. e->Graphics->DrawPath( Pens::Black, myPath ); // Widen the path. Pen^ widenPen = gcnew Pen( Color::Black,10.0f ); Matrix^ widenMatrix = gcnew Matrix; widenMatrix->Translate( 50, 50 ); myPath->Widen( widenPen, widenMatrix, 1.0f ); // Draw the widened path to the screen in red. e->Graphics->FillPath( gcnew SolidBrush( Color::Red ), myPath ); }
private void WidenExample(PaintEventArgs e) { // Create a path and add two ellipses. GraphicsPath myPath = new GraphicsPath(); myPath.AddEllipse(0, 0, 100, 100); myPath.AddEllipse(100, 0, 100, 100); // Draw the original ellipses to the screen in black. e.get_Graphics().DrawPath(Pens.get_Black(), myPath); // Widen the path. Pen widenPen = new Pen(Color.get_Black(), 10); Matrix widenMatrix = new Matrix(); widenMatrix.Translate(50, 50); myPath.Widen(widenPen, widenMatrix, 1); // Draw the widened path to the screen in red. e.get_Graphics().FillPath(new SolidBrush(Color.get_Red()), myPath); } //WidenExample

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.Widen メソッド

名前 | 説明 |
---|---|
GraphicsPath.Widen (Pen) | パスに追加のアウトラインを追加します。 |
GraphicsPath.Widen (Pen, Matrix) | GraphicsPath に別のアウトラインを追加します。 |
GraphicsPath.Widen (Pen, Matrix, Single) | この GraphicsPath を、指定されたペンでこのパスを描画するときに塗りつぶされる領域を囲む曲線に置換します。 |

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


このメソッドは、この GraphicsPath の元の線の周りにアウトラインを作成します。既存の線と新しいアウトライン間の距離として、Widen の呼び出し時に使用される Pen の幅が使用されます。線の間の空間を塗りつぶす場合は、DrawPath ではなく FillPath を使用する必要があります。


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- GraphicsPath.Widenのページへのリンク