Graphics.ExcludeClip メソッド (Rectangle)
アセンブリ: System.Drawing (system.drawing.dll 内)



次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub ExcludeClipRectangle(ByVal e As PaintEventArgs) ' Create rectangle for exclusion. Dim excludeRect As New Rectangle(100, 100, 200, 200) ' Set clipping region to exclude rectangle. e.Graphics.ExcludeClip(excludeRect) ' Fill large rectangle to show clipping region. e.Graphics.FillRectangle(New SolidBrush(Color.Blue), 0, 0, _ 300, 300) End Sub
public void ExcludeClipRectangle(PaintEventArgs e) { // Create rectangle for exclusion. Rectangle excludeRect = new Rectangle(100, 100, 200, 200); // Set clipping region to exclude rectangle. e.Graphics.ExcludeClip(excludeRect); // Fill large rectangle to show clipping region. e.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 300, 300); }
public: void ExcludeClipRectangle( PaintEventArgs^ e ) { // Create rectangle for exclusion. Rectangle excludeRect = Rectangle(100,100,200,200); // Set clipping region to exclude rectangle. e->Graphics->ExcludeClip( excludeRect ); // Fill large rectangle to show clipping region. e->Graphics->FillRectangle( gcnew SolidBrush( Color::Blue ), 0, 0, 300, 300 ); }
public void ExcludeClipRectangle(PaintEventArgs e) { // Create rectangle for exclusion. Rectangle excludeRect = new Rectangle(100, 100, 200, 200); // Set clipping region to exclude rectangle. e.get_Graphics().ExcludeClip(excludeRect); // Fill large rectangle to show clipping region. e.get_Graphics().FillRectangle(new SolidBrush(Color.get_Blue()), 0, 0, 300, 300); } //ExcludeClipRegion

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


Graphics.ExcludeClip メソッド (Region)
アセンブリ: System.Drawing (system.drawing.dll 内)



次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub ExcludeClipRegion(ByVal e As PaintEventArgs) ' Create rectangle for region. Dim excludeRect As New Rectangle(100, 100, 200, 200) ' Create region for exclusion. Dim excludeRegion As New [Region](excludeRect) ' Set clipping region to exclude region. e.Graphics.ExcludeClip(excludeRegion) ' Fill large rectangle to show clipping region. e.Graphics.FillRectangle(New SolidBrush(Color.Blue), 0, 0, _ 300, 300) End Sub
public void ExcludeClipRegion(PaintEventArgs e) { // Create rectangle for region. Rectangle excludeRect = new Rectangle(100, 100, 200, 200); // Create region for exclusion. Region excludeRegion = new Region(excludeRect); // Set clipping region to exclude region. e.Graphics.ExcludeClip(excludeRegion); // Fill large rectangle to show clipping region. e.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0, 300, 300); }
public: void ExcludeClipRegion( PaintEventArgs^ e ) { // Create rectangle for region. Rectangle excludeRect = Rectangle(100,100,200,200); // Create region for exclusion. System::Drawing::Region^ excludeRegion = gcnew System::Drawing::Region( excludeRect ); // Set clipping region to exclude region. e->Graphics->ExcludeClip( excludeRegion ); // Fill large rectangle to show clipping region. e->Graphics->FillRectangle( gcnew SolidBrush( Color::Blue ), 0, 0, 300, 300 ); }
public void ExcludeClipRegion(PaintEventArgs e) { // Create rectangle for region. Rectangle excludeRect = new Rectangle(100, 100, 200, 200); // Create region for exclusion. Region excludeRegion = new Region(excludeRect); // Set clipping region to exclude region. e.get_Graphics().ExcludeClip(excludeRegion); // Fill large rectangle to show clipping region. e.get_Graphics().FillRectangle(new SolidBrush(Color.get_Blue()), 0, 0, 300, 300); } //ExcludeClipRectangle

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


Graphics.ExcludeClip メソッド
- Graphics.ExcludeClipのページへのリンク