Graphics.ExcludeClipとは? わかりやすく解説

Graphics.ExcludeClip メソッド (Rectangle)

Rectangle 構造体指定され領域除外されるように、この Graphicsクリップ領域更新します

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

Public Sub ExcludeClip ( _
    rect As Rectangle _
)
Dim instance As Graphics
Dim rect As Rectangle

instance.ExcludeClip(rect)
public void ExcludeClip (
    Rectangle rect
)
public:
void ExcludeClip (
    Rectangle rect
)
public void ExcludeClip (
    Rectangle rect
)
public function ExcludeClip (
    rect : Rectangle
)

パラメータ

rect

クリップ領域から除外する四角形指定する Rectangle 構造体

解説解説
使用例使用例

次の例は、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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.ExcludeClip メソッド (Region)

Region指定され領域除外されるように、この Graphicsクリップ領域更新します

名前空間: System.Drawing
アセンブリ: 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.ExcludeClip メソッド




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

辞書ショートカット

すべての辞書の索引

「Graphics.ExcludeClip」の関連用語

Graphics.ExcludeClipのお隣キーワード
検索ランキング

   

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



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

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

©2024 GRAS Group, Inc.RSS