Graphics.ResetClip メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Graphics.ResetClip メソッドの意味・解説 

Graphics.ResetClip メソッド

この Graphicsクリップ領域無制限領域リセットします。

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

Dim instance As Graphics

instance.ResetClip
public void ResetClip ()
public:
void ResetClip ()
public void ResetClip ()
解説解説

Graphicsクリッピング領域無制限場合、この Graphics によって描画される項目はクリップされません。

使用例使用例

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

2 つ四角形交差部分だけが青く塗りつぶされます。

Public Sub IntersectClipRectangleF2(ByVal
 e As PaintEventArgs)

    ' Set clipping region.
    Dim clipRect As New
 Rectangle(0, 0, 200, 200)
    e.Graphics.SetClip(clipRect)

    ' Update clipping region to intersection of

    ' existing region with specified rectangle.
    Dim intersectRectF As New
 RectangleF(100.0F, 100.0F, 200.0F, 200.0F)
    e.Graphics.IntersectClip(intersectRectF)

    ' Fill rectangle to demonstrate effective clipping region.
    e.Graphics.FillRectangle(New SolidBrush(Color.Blue), 0, 0,
 _
    500, 500)

    ' Reset clipping region to infinite.
    e.Graphics.ResetClip()

    ' Draw clipRect and intersectRect to screen.
    e.Graphics.DrawRectangle(New Pen(Color.Black), clipRect)
    e.Graphics.DrawRectangle(New Pen(Color.Red), _
    Rectangle.Round(intersectRectF))
End Sub
public void IntersectClipRectangleF2(PaintEventArgs
 e)
{

    // Set clipping region.
    Rectangle clipRect = new Rectangle(0, 0, 200, 200);
    e.Graphics.SetClip(clipRect);

    // Update clipping region to intersection of

    // existing region with specified rectangle.
    RectangleF intersectRectF = new RectangleF(100.0F, 100.0F,
 200.0F, 200.0F);
    e.Graphics.IntersectClip(intersectRectF);

    // Fill rectangle to demonstrate effective clipping region.
    e.Graphics.FillRectangle(new SolidBrush(Color.Blue), 0, 0,
 500, 500);

    // Reset clipping region to infinite.
    e.Graphics.ResetClip();

    // Draw clipRect and intersectRect to screen.
    e.Graphics.DrawRectangle(new Pen(Color.Black), clipRect);
    e.Graphics.DrawRectangle(new Pen(Color.Red), Rectangle.Round(intersectRectF));
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「Graphics.ResetClip メソッド」の関連用語

Graphics.ResetClip メソッドのお隣キーワード
検索ランキング

   

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



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

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

©2024 GRAS Group, Inc.RSS