GraphicsPath.Flatten メソッド (Matrix)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
使用例
プラットフォーム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.Flatten メソッド (Matrix, Single)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文Dim instance As GraphicsPath Dim matrix As Matrix Dim flatness As Single instance.Flatten(matrix, flatness)
使用例次のコード例は、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
プラットフォーム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.Flatten メソッド
オーバーロードの一覧| 名前 | 説明 |
|---|---|
| GraphicsPath.Flatten () | パスの各曲線を、接続された線分のシーケンスに変換します。 |
| GraphicsPath.Flatten (Matrix) | 指定された変換を適用し、GraphicsPath の各曲線を、接続された線分のシーケンスに変換します。 |
| GraphicsPath.Flatten (Matrix, Single) | この GraphicsPath の各曲線を、接続された線分のシーケンスに変換します。 |
参照GraphicsPath.Flatten メソッド ()
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
使用例
プラットフォーム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.Flatten メソッドのページへのリンク