Brush 類別

定義

定義用於填滿圖形形狀內部的物件,例如矩形、橢圓形、派形、多邊形和路徑。Defines objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.

public ref class Brush abstract : MarshalByRefObject, ICloneable, IDisposable
public abstract class Brush : MarshalByRefObject, ICloneable, IDisposable
type Brush = class
    inherit MarshalByRefObject
    interface ICloneable
    interface IDisposable
Public MustInherit Class Brush
Inherits MarshalByRefObject
Implements ICloneable, IDisposable
繼承
衍生
實作

備註

這是抽象基類,無法具現化。This is an abstract base class and cannot be instantiated. 若要建立筆刷物件,請使用衍生Brush自的類別SolidBrushTextureBrush例如、 LinearGradientBrush和。To create a brush object, use classes derived from Brush, such as SolidBrush, TextureBrush, and LinearGradientBrush.

給繼承者的注意事項

當您從Brush類別繼承時,您必須覆Clone()寫方法。When you inherit from the Brush class, you must override the Clone() method.

建構函式

Brush()

初始化 Brush 類別的新執行個體。Initializes a new instance of the Brush class.

方法

Clone()

在衍生類別中覆寫時,建立這個 Brush 的完全相同複本。When overridden in a derived class, creates an exact copy of this Brush.

CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(繼承來源 MarshalByRefObject)
Dispose()

釋放這個 Brush 物件使用的所有資源。Releases all resources used by this Brush object.

Dispose(Boolean)

釋放 Brush 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the Brush and optionally releases the managed resources.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Finalize()

允許物件在記憶體回收進行回收之前,嘗試釋放資源並執行其他清除作業。Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetLifetimeService()

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(繼承來源 MarshalByRefObject)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
InitializeLifetimeService()

取得存留期服務物件,以控制這個執行個體的存留期原則。Obtains a lifetime service object to control the lifetime policy for this instance.

(繼承來源 MarshalByRefObject)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。Creates a shallow copy of the current MarshalByRefObject object.

(繼承來源 MarshalByRefObject)
SetNativeBrush(IntPtr)

在衍生類別中,設定 GDI+GDI+ 筆刷物件的參考。In a derived class, sets a reference to a GDI+GDI+ brush object.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於