GraphicsPath.Widen メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
このパスを、指定されたペンでこのパスを描画するときに塗りつぶされる領域を囲む曲線に置換します。
オーバーロード
Widen(Pen, Matrix) |
GraphicsPath に別のアウトラインを追加します。 |
Widen(Pen) |
パスに追加のアウトラインを追加します。 |
Widen(Pen, Matrix, Single) |
この GraphicsPath を、指定されたペンでこのパスを描画するときに塗りつぶされる領域を囲む曲線に置換します。 |
Widen(Pen, Matrix)
- ソース:
- GraphicsPath.cs
- ソース:
- GraphicsPath.cs
- ソース:
- GraphicsPath.cs
GraphicsPath に別のアウトラインを追加します。
public:
void Widen(System::Drawing::Pen ^ pen, System::Drawing::Drawing2D::Matrix ^ matrix);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix matrix);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix? matrix);
member this.Widen : System.Drawing.Pen * System.Drawing.Drawing2D.Matrix -> unit
Public Sub Widen (pen As Pen, matrix As Matrix)
パラメーター
例
例については、「Widen(Pen, Matrix, Single)」を参照してください。
注釈
このメソッドは、 の呼び出しWidenで使用される の幅と等しい既存の行と新しいアウトラインの間の距離を持つ、この GraphicsPath内の元の行のPen周りにアウトラインを作成します。 行間のスペースを埋める場合は、 ではなく を FillPath 使用する DrawPath必要があります。
適用対象
Widen(Pen)
- ソース:
- GraphicsPath.cs
- ソース:
- GraphicsPath.cs
- ソース:
- GraphicsPath.cs
パスに追加のアウトラインを追加します。
public:
void Widen(System::Drawing::Pen ^ pen);
public void Widen (System.Drawing.Pen pen);
member this.Widen : System.Drawing.Pen -> unit
Public Sub Widen (pen As Pen)
パラメーター
例
例については、「Widen(Pen, Matrix, Single)」を参照してください。
注釈
このメソッドは、 の呼び出しWidenで使用される の幅と等しい既存の行と新しいアウトラインの間の距離を持つ、この GraphicsPath内の元の行のPen周りにアウトラインを作成します。 行間のスペースを埋める場合は、 ではなく を FillPath 使用する DrawPath必要があります。
適用対象
Widen(Pen, Matrix, Single)
- ソース:
- GraphicsPath.cs
- ソース:
- GraphicsPath.cs
- ソース:
- GraphicsPath.cs
この GraphicsPath を、指定されたペンでこのパスを描画するときに塗りつぶされる領域を囲む曲線に置換します。
public:
void Widen(System::Drawing::Pen ^ pen, System::Drawing::Drawing2D::Matrix ^ matrix, float flatness);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix matrix, float flatness);
public void Widen (System.Drawing.Pen pen, System.Drawing.Drawing2D.Matrix? matrix, float flatness);
member this.Widen : System.Drawing.Pen * System.Drawing.Drawing2D.Matrix * single -> unit
Public Sub Widen (pen As Pen, matrix As Matrix, flatness As Single)
パラメーター
- flatness
- Single
曲線の平坦度を指定する値。
例
次のコード例は、Windows フォームで使用するように設計されており、イベント オブジェクトがOnPaint必要PaintEventArgse
です。 コードは、次のアクションを実行します。
パスを作成し、パスに 2 つの省略記号を追加します。
パスを黒で描画します。
パスを拡大します。
パスを赤で描画します。
2 番目のレンダリングでは の代わりに DrawPathが使用FillPathされるため、レンダリングされた図にはアウトラインが塗りつぶされていることに注意してください。
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.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);
}
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
注釈
このメソッドは、 の呼び出しWidenで使用される の幅と等しい既存の行と新しいアウトラインの間の距離を持つ、この GraphicsPath内の元の行のPen周りにアウトラインを作成します。 行間のスペースを埋める場合は、 ではなく を FillPath 使用する DrawPath必要があります。
適用対象
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示