GraphicsPath.Flattenとは? わかりやすく解説

GraphicsPath.Flatten メソッド ()


GraphicsPath.Flatten メソッド (Matrix)


GraphicsPath.Flatten メソッド (Matrix, Single)

この GraphicsPath各曲線を、接続され線分シーケンス変換します

名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

使用例使用例

次のコード例は、Windows フォームでの使用意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコード次のアクション実行します

赤い曲線には、点を接続する平坦化された直線あります

Public Sub FlattenExample(ByVal
 e As PaintEventArgs)
    Dim myPath As New GraphicsPath
    Dim translateMatrix As New
 Matrix
    translateMatrix.Translate(0, 10)
    Dim point1 As New Point(20,
 100)
    Dim point2 As New Point(70,
 10)
    Dim point3 As New Point(130,
 200)
    Dim point4 As New Point(180,
 100)
    Dim points As Point() = {point1, point2,
 point3, point4}
    myPath.AddCurve(points)
    e.Graphics.DrawPath(New Pen(Color.Black, 2), myPath)
    myPath.Flatten(translateMatrix, 10.0F)
    e.Graphics.DrawPath(New Pen(Color.Red, 1), myPath)
End Sub
'FlattenExample
private void FlattenExample(PaintEventArgs
 e)
{
    GraphicsPath myPath = new GraphicsPath();
    Matrix translateMatrix = new Matrix();
    translateMatrix.Translate(0, 10);
    Point point1 = new Point(20, 100);
    Point point2 = new Point(70, 10);
    Point point3 = new Point(130, 200);
    Point point4 = new Point(180, 100);
    Point[] points = {point1, point2, point3, point4};
    myPath.AddCurve(points);
    e.Graphics.DrawPath(new Pen(Color.Black, 2), myPath);
    myPath.Flatten(translateMatrix, 10f);
    e.Graphics.DrawPath(new Pen(Color.Red, 1), myPath);
}
private:
   void FlattenExample( PaintEventArgs^ e )
   {
      GraphicsPath^ myPath = gcnew GraphicsPath;
      Matrix^ translateMatrix = gcnew Matrix;
      translateMatrix->Translate( 0, 10 );
      Point point1 = Point(20,100);
      Point point2 = Point(70,10);
      Point point3 = Point(130,200);
      Point point4 = Point(180,100);
      array<Point>^ points = {point1,point2,point3,point4};
      myPath->AddCurve( points );
      e->Graphics->DrawPath( gcnew Pen( Color::Black,2.0f ), myPath );
      myPath->Flatten( translateMatrix, 10.0f );
      e->Graphics->DrawPath( gcnew Pen( Color::Red,1.0f ), myPath );
   }
private void FlattenExample(PaintEventArgs
 e)
{
    GraphicsPath myPath = new GraphicsPath();
    Matrix translateMatrix = new Matrix();

    translateMatrix.Translate(0, 10);

    Point point1 = new Point(20, 100);
    Point point2 = new Point(70, 10);
    Point point3 = new Point(130, 200);
    Point point4 = new Point(180, 100);
    Point points[] =  { point1, point2, point3, point4 };

    myPath.AddCurve(points);
    e.get_Graphics().DrawPath(new Pen(Color.get_Black(), 2), myPath);
    myPath.Flatten(translateMatrix, 10);
    e.get_Graphics().DrawPath(new Pen(Color.get_Red(), 1), myPath);
} //FlattenExample
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

GraphicsPath.Flatten メソッド

パス各曲線を、接続され線分シーケンス変換します
オーバーロードの一覧オーバーロードの一覧

名前 説明
GraphicsPath.Flatten () パス各曲線を、接続され線分シーケンス変換します
GraphicsPath.Flatten (Matrix) 指定され変換適用し、GraphicsPath の各曲線を、接続され線分シーケンス変換します
GraphicsPath.Flatten (Matrix, Single) この GraphicsPath各曲線を、接続され線分シーケンス変換します
参照参照

関連項目

GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からGraphicsPath.Flattenを検索した結果を表示しています。
Weblioに収録されているすべての辞書からGraphicsPath.Flattenを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からGraphicsPath.Flatten を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「GraphicsPath.Flatten」の関連用語

GraphicsPath.Flattenのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



GraphicsPath.Flattenのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS