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

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

Graphics.TranslateClip メソッド (Single, Single)

指定した量だけ水平方向および垂直方向に、この Graphicsクリッピング領域平行移動ます。

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

Public Sub TranslateClip ( _
    dx As Single, _
    dy As Single _
)
Dim instance As Graphics
Dim dx As Single
Dim dy As Single

instance.TranslateClip(dx, dy)
public void TranslateClip (
    float dx,
    float dy
)
public:
void TranslateClip (
    float dx, 
    float dy
)
public void TranslateClip (
    float dx, 
    float dy
)
public function TranslateClip (
    dx : float, 
    dy : float
)

パラメータ

dx

平行移動する x 座標

dy

平行移動する y 座標

使用例使用例

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

平行移動した小さな黒い四角形生成されます。

Public Sub TranslateClipFloat(ByVal
 e As PaintEventArgs)

    ' Create rectangle for clipping region.
    Dim clipRect As New
 RectangleF(0.0F, 0.0F, 100.0F, 100.0F)

    ' Set clipping region of graphics to rectangle.
    e.Graphics.SetClip(clipRect)

    ' Translate clipping region.
    Dim dx As Single = 50.0F
    Dim dy As Single = 50.0F
    e.Graphics.TranslateClip(dx, dy)

    ' Fill rectangle to demonstrate translated clip region.
    e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0,
 _
    500, 300)
End Sub
public void TranslateClipFloat(PaintEventArgs
 e)
{

    // Create rectangle for clipping region.
    RectangleF clipRect = new RectangleF(0.0F, 0.0F, 100.0F, 100.0F);

    // Set clipping region of graphics to rectangle.
    e.Graphics.SetClip(clipRect);

    // Translate clipping region.
    float dx = 50.0F;
    float dy = 50.0F;
    e.Graphics.TranslateClip(dx, dy);

    // Fill rectangle to demonstrate translated clip region.
    e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0,
 500, 300);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.TranslateClip メソッド (Int32, Int32)

指定した量だけ水平方向および垂直方向に、この Graphicsクリッピング領域平行移動ます。

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

Public Sub TranslateClip ( _
    dx As Integer, _
    dy As Integer _
)
Dim instance As Graphics
Dim dx As Integer
Dim dy As Integer

instance.TranslateClip(dx, dy)
public void TranslateClip (
    int dx,
    int dy
)
public:
void TranslateClip (
    int dx, 
    int dy
)
public void TranslateClip (
    int dx, 
    int dy
)
public function TranslateClip (
    dx : int, 
    dy : int
)

パラメータ

dx

平行移動する x 座標

dy

平行移動する y 座標

使用例使用例

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

平行移動した小さな黒い四角形生成されます。

Public Sub TranslateClipInt(ByVal
 e As PaintEventArgs)

    ' Create rectangle for clipping region.
    Dim clipRect As New
 Rectangle(0, 0, 100, 100)

    ' Set clipping region of graphics to rectangle.
    e.Graphics.SetClip(clipRect)

    ' Translate clipping region.
    Dim dx As Integer =
 50
    Dim dy As Integer =
 50
    e.Graphics.TranslateClip(dx, dy)

    ' Fill rectangle to demonstrate translated clip region.
    e.Graphics.FillRectangle(New SolidBrush(Color.Black), 0, 0,
 _
    500, 300)
End Sub
public void TranslateClipInt(PaintEventArgs
 e)
{

    // Create rectangle for clipping region.
    Rectangle clipRect = new Rectangle(0, 0, 100, 100);

    // Set clipping region of graphics to rectangle.
    e.Graphics.SetClip(clipRect);

    // Translate clipping region.
    int dx = 50;
    int dy = 50;
    e.Graphics.TranslateClip(dx, dy);

    // Fill rectangle to demonstrate translated clip region.
    e.Graphics.FillRectangle(new SolidBrush(Color.Black), 0, 0,
 500, 300);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.TranslateClip メソッド

指定した量だけ水平方向および垂直方向に、この Graphicsクリッピング領域平行移動ます。
オーバーロードの一覧オーバーロードの一覧

名前 説明
Graphics.TranslateClip (Int32, Int32) 指定した量だけ水平方向および垂直方向に、この Graphicsクリッピング領域平行移動ます。
Graphics.TranslateClip (Single, Single) 指定した量だけ水平方向および垂直方向に、この Graphicsクリッピング領域平行移動ます。
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS