Region.IsEmpty(Graphics) 方法

定义

测试此 Region 在指定绘图图面上是否有空的内部。Tests whether this Region has an empty interior on the specified drawing surface.

public:
 bool IsEmpty(System::Drawing::Graphics ^ g);
public bool IsEmpty (System.Drawing.Graphics g);
member this.IsEmpty : System.Drawing.Graphics -> bool
Public Function IsEmpty (g As Graphics) As Boolean

参数

g
Graphics

一个 Graphics,表示绘图图面。A Graphics that represents a drawing surface.

返回

Boolean

如果在应用了与 g 关联的变换后,此 Region 的内部为空,将为 true;否则为 falsetrue if the interior of this Region is empty when the transformation associated with g is applied; otherwise, false.

例外

gnullg is null.

注解

图形上下文的当前转换 g 用于计算绘制图面上的内部区域。The current transformation of the graphics context g is used to compute the region interior on the drawing surface.

适用于