Region.IsVisible メソッド

定義

指定の四角形がこの Region に含まれているかどうかをテストします。

オーバーロード

IsVisible(Single, Single, Single, Single, Graphics)

指定の Region オブジェクトを使用して描画した場合に、指定の四角形の一部がこの Graphics に含まれるかどうかをテストします。

IsVisible(Int32, Int32, Int32, Int32, Graphics)

指定の Region オブジェクトを使用して描画した場合に、指定の四角形の一部がこの Graphics に含まれるかどうかをテストします。

IsVisible(Single, Single, Single, Single)

指定の四角形の一部が、この Region に含まれているかどうかをテストします。

IsVisible(Int32, Int32, Int32, Int32)

指定の四角形の一部が、この Region に含まれているかどうかをテストします。

IsVisible(Single, Single, Graphics)

指定の Region を使用して描画した場合に、指定の点がこの Graphics に含まれるかどうかをテストします。

IsVisible(Int32, Int32, Graphics)

指定の Region オブジェクトを使用して描画した場合に、指定の点がこの Graphics オブジェクト内に含まれるかどうかをテストします。

IsVisible(Single, Single)

指定の点がこの Region に含まれているかどうかをテストします。

IsVisible(Point)

指定の Point 構造体がこの Region に含まれているかどうかをテストします。

IsVisible(Rectangle, Graphics)

指定の Rectangle を使用して描画した場合に、指定の Region 構造体の一部がこの Graphics に含まれるかどうかをテストします。

IsVisible(PointF, Graphics)

指定の PointF を使用して描画した場合に、指定の Region 構造体がこの Graphics に含まれるかどうかをテストします。

IsVisible(Point, Graphics)

指定の Point を使用して描画した場合に、指定の Region 構造体がこの Graphics に含まれるかどうかをテストします。

IsVisible(RectangleF)

指定の RectangleF 構造体の一部が、この Region に含まれているかどうかをテストします。

IsVisible(Rectangle)

指定の Rectangle 構造体の一部が、この Region に含まれているかどうかをテストします。

IsVisible(PointF)

指定の PointF 構造体がこの Region に含まれているかどうかをテストします。

IsVisible(RectangleF, Graphics)

指定の RectangleF を使用して描画した場合に、指定の Region 構造体の一部がこの Graphics に含まれるかどうかをテストします。

IsVisible(Single, Single, Single, Single, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Region オブジェクトを使用して描画した場合に、指定の四角形の一部がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(float x, float y, float width, float height, System::Drawing::Graphics ^ g);
public bool IsVisible (float x, float y, float width, float height, System.Drawing.Graphics g);
public bool IsVisible (float x, float y, float width, float height, System.Drawing.Graphics? g);
member this.IsVisible : single * single * single * single * System.Drawing.Graphics -> bool
Public Function IsVisible (x As Single, y As Single, width As Single, height As Single, g As Graphics) As Boolean

パラメーター

x
Single

テストする四角形の左上隅の x 座標。

y
Single

テストする四角形の左上隅の y 座標。

width
Single

テストする四角形の幅。

height
Single

テストする四角形の高さ。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

指定した四角形のいずれかの部分がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェイス上の領域の内部座標と四角形座標を計算するために使用されます。

適用対象

IsVisible(Int32, Int32, Int32, Int32, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Region オブジェクトを使用して描画した場合に、指定の四角形の一部がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(int x, int y, int width, int height, System::Drawing::Graphics ^ g);
public bool IsVisible (int x, int y, int width, int height, System.Drawing.Graphics g);
public bool IsVisible (int x, int y, int width, int height, System.Drawing.Graphics? g);
member this.IsVisible : int * int * int * int * System.Drawing.Graphics -> bool
Public Function IsVisible (x As Integer, y As Integer, width As Integer, height As Integer, g As Graphics) As Boolean

パラメーター

x
Int32

テストする四角形の左上隅の x 座標。

y
Int32

テストする四角形の左上隅の y 座標。

width
Int32

テストする四角形の幅。

height
Int32

テストする四角形の高さ。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

指定した四角形のいずれかの部分がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェイス上の領域の内部座標と四角形座標を計算するために使用されます。

適用対象

IsVisible(Single, Single, Single, Single)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の四角形の一部が、この Region に含まれているかどうかをテストします。

public:
 bool IsVisible(float x, float y, float width, float height);
public bool IsVisible (float x, float y, float width, float height);
member this.IsVisible : single * single * single * single -> bool
Public Function IsVisible (x As Single, y As Single, width As Single, height As Single) As Boolean

パラメーター

x
Single

テストする四角形の左上隅の x 座標。

y
Single

テストする四角形の左上隅の y 座標。

width
Single

テストする四角形の幅。

height
Single

テストする四角形の高さ。

戻り値

指定した四角形のいずれかの部分が Region オブジェクトに含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

適用対象

IsVisible(Int32, Int32, Int32, Int32)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の四角形の一部が、この Region に含まれているかどうかをテストします。

public:
 bool IsVisible(int x, int y, int width, int height);
public bool IsVisible (int x, int y, int width, int height);
member this.IsVisible : int * int * int * int -> bool
Public Function IsVisible (x As Integer, y As Integer, width As Integer, height As Integer) As Boolean

パラメーター

x
Int32

テストする四角形の左上隅の x 座標。

y
Int32

テストする四角形の左上隅の y 座標。

width
Int32

テストする四角形の幅。

height
Int32

テストする四角形の高さ。

戻り値

指定した四角形のいずれかの部分がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

適用対象

IsVisible(Single, Single, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Region を使用して描画した場合に、指定の点がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(float x, float y, System::Drawing::Graphics ^ g);
public bool IsVisible (float x, float y, System.Drawing.Graphics g);
public bool IsVisible (float x, float y, System.Drawing.Graphics? g);
member this.IsVisible : single * single * System.Drawing.Graphics -> bool
Public Function IsVisible (x As Single, y As Single, g As Graphics) As Boolean

パラメーター

x
Single

テストする点の x 座標。

y
Single

テストする点の y 座標。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

指定の点がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェス上の領域内部と点座標を計算するために使用されます。

適用対象

IsVisible(Int32, Int32, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Region オブジェクトを使用して描画した場合に、指定の点がこの Graphics オブジェクト内に含まれるかどうかをテストします。

public:
 bool IsVisible(int x, int y, System::Drawing::Graphics ^ g);
public bool IsVisible (int x, int y, System.Drawing.Graphics g);
public bool IsVisible (int x, int y, System.Drawing.Graphics? g);
member this.IsVisible : int * int * System.Drawing.Graphics -> bool
Public Function IsVisible (x As Integer, y As Integer, g As Graphics) As Boolean

パラメーター

x
Int32

テストする点の x 座標。

y
Int32

テストする点の y 座標。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

指定の点がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェス上の領域内部と点座標を計算するために使用されます。

適用対象

IsVisible(Single, Single)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の点がこの Region に含まれているかどうかをテストします。

public:
 bool IsVisible(float x, float y);
public bool IsVisible (float x, float y);
member this.IsVisible : single * single -> bool
Public Function IsVisible (x As Single, y As Single) As Boolean

パラメーター

x
Single

テストする点の x 座標。

y
Single

テストする点の y 座標。

戻り値

指定の点がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

適用対象

IsVisible(Point)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Point 構造体がこの Region に含まれているかどうかをテストします。

public:
 bool IsVisible(System::Drawing::Point point);
public bool IsVisible (System.Drawing.Point point);
member this.IsVisible : System.Drawing.Point -> bool
Public Function IsVisible (point As Point) As Boolean

パラメーター

point
Point

テスト対象の Point 構造体。

戻り値

point がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

適用対象

IsVisible(Rectangle, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Rectangle を使用して描画した場合に、指定の Region 構造体の一部がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(System::Drawing::Rectangle rect, System::Drawing::Graphics ^ g);
public bool IsVisible (System.Drawing.Rectangle rect, System.Drawing.Graphics g);
public bool IsVisible (System.Drawing.Rectangle rect, System.Drawing.Graphics? g);
member this.IsVisible : System.Drawing.Rectangle * System.Drawing.Graphics -> bool
Public Function IsVisible (rect As Rectangle, g As Graphics) As Boolean

パラメーター

rect
Rectangle

テスト対象の Rectangle 構造体。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

rect の一部が、この Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェイス上の領域の内部座標と四角形座標を計算するために使用されます。

適用対象

IsVisible(PointF, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の PointF を使用して描画した場合に、指定の Region 構造体がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(System::Drawing::PointF point, System::Drawing::Graphics ^ g);
public bool IsVisible (System.Drawing.PointF point, System.Drawing.Graphics g);
public bool IsVisible (System.Drawing.PointF point, System.Drawing.Graphics? g);
member this.IsVisible : System.Drawing.PointF * System.Drawing.Graphics -> bool
Public Function IsVisible (point As PointF, g As Graphics) As Boolean

パラメーター

point
PointF

テスト対象の PointF 構造体。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

point がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェス上の領域内部と点座標を計算するために使用されます。

適用対象

IsVisible(Point, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Point を使用して描画した場合に、指定の Region 構造体がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(System::Drawing::Point point, System::Drawing::Graphics ^ g);
public bool IsVisible (System.Drawing.Point point, System.Drawing.Graphics g);
public bool IsVisible (System.Drawing.Point point, System.Drawing.Graphics? g);
member this.IsVisible : System.Drawing.Point * System.Drawing.Graphics -> bool
Public Function IsVisible (point As Point, g As Graphics) As Boolean

パラメーター

point
Point

テスト対象の Point 構造体。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

point がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェス上の領域内部と点座標を計算するために使用されます。

適用対象

IsVisible(RectangleF)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の RectangleF 構造体の一部が、この Region に含まれているかどうかをテストします。

public:
 bool IsVisible(System::Drawing::RectangleF rect);
public bool IsVisible (System.Drawing.RectangleF rect);
member this.IsVisible : System.Drawing.RectangleF -> bool
Public Function IsVisible (rect As RectangleF) As Boolean

パラメーター

rect
RectangleF

テスト対象の RectangleF 構造体。

戻り値

rect の一部が、この Region に含まれている場合は true。それ以外の場合は false

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

  • 最初の四角形を作成し、青で画面に描画します。

  • 2 番目の四角形を作成し、赤で画面に描画します。

  • 最初の四角形から領域を作成します。

  • 四角形の任意の部分が領域と交差するかどうかを決定します。

  • または false 結果をtrue画面に表示します。

四角形が領域と交差しているため、結果は になります true

public:
   void IsVisible_RectF_Example( PaintEventArgs^ e )
   {
      // Create the first rectangle and draw it to the screen in blue.
      Rectangle regionRect = Rectangle(20,20,100,100);
      e->Graphics->DrawRectangle( Pens::Blue, regionRect );

      // Create the second rectangle and draw it to the screen in red.
      RectangleF myRect = RectangleF(90,30,100,100);
      e->Graphics->DrawRectangle( Pens::Red, Rectangle::Round( myRect ) );

      // Create a region using the first rectangle.
      System::Drawing::Region^ myRegion = gcnew System::Drawing::Region( regionRect );

      // Determine if myRect is contained in the region.
      bool contained = myRegion->IsVisible( myRect );

      // Display the result.
      System::Drawing::Font^ myFont = gcnew System::Drawing::Font( "Arial",8 );
      SolidBrush^ myBrush = gcnew SolidBrush( Color::Black );
      e->Graphics->DrawString( String::Format( "contained = {0}", contained ), myFont, myBrush, PointF(20,140) );
   }
public void IsVisible_RectF_Example(PaintEventArgs e)
{
             
    // Create the first rectangle and draw it to the screen in blue.
    Rectangle regionRect = new Rectangle(20, 20, 100, 100);
    e.Graphics.DrawRectangle(Pens.Blue, regionRect);
             
    // Create the second rectangle and draw it to the screen in red.
    RectangleF myRect = new RectangleF(90, 30, 100, 100);
    e.Graphics.DrawRectangle(Pens.Red, Rectangle.Round(myRect));
             
    // Create a region using the first rectangle.
    Region myRegion = new Region(regionRect);
             
    // Determine if myRect is contained in the region.
    bool contained = myRegion.IsVisible(myRect);
             
    // Display the result.
    Font myFont = new Font("Arial", 8);
    SolidBrush myBrush = new SolidBrush(Color.Black);
    e.Graphics.DrawString("contained = " + contained.ToString(),
        myFont,
        myBrush,
        new PointF(20, 140));
}
Public Sub IsVisible_RectF_Example(ByVal e As PaintEventArgs)

    ' Create the first rectangle and draw it to the screen in blue.
    Dim regionRect As New Rectangle(20, 20, 100, 100)
    e.Graphics.DrawRectangle(Pens.Blue, regionRect)

    ' create the second rectangle and draw it to the screen in red.
    Dim myRect As New RectangleF(90, 30, 100, 100)
    e.Graphics.DrawRectangle(Pens.Red, Rectangle.Round(myRect))

    ' Create a region using the first rectangle.
    Dim myRegion As New [Region](regionRect)

    ' Determine if myRect is contained in the region.
    Dim contained As Boolean = myRegion.IsVisible(myRect)

    ' Display the result.
    Dim myFont As New Font("Arial", 8)
    Dim myBrush As New SolidBrush(Color.Black)
    e.Graphics.DrawString("contained = " & contained.ToString(), _
    myFont, myBrush, New PointF(20, 140))
End Sub

適用対象

IsVisible(Rectangle)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の Rectangle 構造体の一部が、この Region に含まれているかどうかをテストします。

public:
 bool IsVisible(System::Drawing::Rectangle rect);
public bool IsVisible (System.Drawing.Rectangle rect);
member this.IsVisible : System.Drawing.Rectangle -> bool
Public Function IsVisible (rect As Rectangle) As Boolean

パラメーター

rect
Rectangle

テスト対象の Rectangle 構造体。

戻り値

このメソッドは、rect の一部が、この Region に含まれている場合は true を返します。それ以外の場合は false を返します。

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

適用対象

IsVisible(PointF)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の PointF 構造体がこの Region に含まれているかどうかをテストします。

public:
 bool IsVisible(System::Drawing::PointF point);
public bool IsVisible (System.Drawing.PointF point);
member this.IsVisible : System.Drawing.PointF -> bool
Public Function IsVisible (point As PointF) As Boolean

パラメーター

point
PointF

テスト対象の PointF 構造体。

戻り値

point がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

適用対象

IsVisible(RectangleF, Graphics)

ソース:
Region.cs
ソース:
Region.cs
ソース:
Region.cs

指定の RectangleF を使用して描画した場合に、指定の Region 構造体の一部がこの Graphics に含まれるかどうかをテストします。

public:
 bool IsVisible(System::Drawing::RectangleF rect, System::Drawing::Graphics ^ g);
public bool IsVisible (System.Drawing.RectangleF rect, System.Drawing.Graphics g);
public bool IsVisible (System.Drawing.RectangleF rect, System.Drawing.Graphics? g);
member this.IsVisible : System.Drawing.RectangleF * System.Drawing.Graphics -> bool
Public Function IsVisible (rect As RectangleF, g As Graphics) As Boolean

パラメーター

rect
RectangleF

テスト対象の RectangleF 構造体。

g
Graphics

グラフィックス コンテキストを表す Graphics

戻り値

rect がこの Region に含まれている場合は true。それ以外の場合は false

コード例については、 メソッドを IsVisible(RectangleF) 参照してください。

注釈

グラフィックス コンテキストの現在の変換は、描画サーフェイス上の領域の内部座標と四角形座標を計算するために使用されます。

適用対象