Pens 類別

定義

所有標準色彩的畫筆。Pens for all the standard colors. 這個類別無法被繼承。This class cannot be inherited.

public ref class Pens sealed
public sealed class Pens
type Pens = class
Public NotInheritable Class Pens
繼承
Pens

範例

下列方法示範如何使用Pens類別。The following method demonstrates how to use the Pens class. 這個範例是設計來與 Windows Forms 搭配使用。This example is designed to be used with Windows Forms. 將程式碼貼入表單, 並在UsePensClass處理表單的Paint事件時呼叫方法, e傳遞PaintEventArgs為。Paste the code into a form and call the UsePensClass method when handling the form's Paint event, passing e as PaintEventArgs.

private:
   void UsePensClass( PaintEventArgs^ e )
   {
      e->Graphics->DrawEllipse( Pens::SlateBlue, Rectangle(40,40,140,140) );
   }
private void UsePensClass(PaintEventArgs e)
{
    e.Graphics.DrawEllipse(Pens.SlateBlue, 
        new Rectangle(40, 40, 140, 140));
}
Private Sub UsePensClass(ByVal e As PaintEventArgs)
    e.Graphics.DrawEllipse(Pens.SlateBlue, _
        New Rectangle(40, 40, 140, 140))
End Sub

備註

這個Pen類別所傳回的物件是不可變的, 也就是說, 它們的屬性無法變更。The Pen objects returned by this class are immutable, meaning their properties cannot be changed. 若要查看此類別中的畫筆所代表的色彩, 請參閱依名稱的色彩To see the colors represented by pens in this class, see Colors by Name.

屬性

AliceBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

AntiqueWhite

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Aqua

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Aquamarine

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Azure

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Beige

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Bisque

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Black

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

BlanchedAlmond

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Blue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

BlueViolet

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Brown

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

BurlyWood

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

CadetBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Chartreuse

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Chocolate

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Coral

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

CornflowerBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Cornsilk

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Crimson

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Cyan

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkCyan

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkGoldenrod

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkGray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkKhaki

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkMagenta

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkOliveGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkOrange

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkOrchid

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkRed

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkSalmon

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkSeaGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkSlateBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkSlateGray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkTurquoise

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DarkViolet

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DeepPink

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DeepSkyBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DimGray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

DodgerBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Firebrick

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

FloralWhite

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

ForestGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Fuchsia

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Gainsboro

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

GhostWhite

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Gold

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Goldenrod

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Gray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Green

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

GreenYellow

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Honeydew

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

HotPink

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

IndianRed

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Indigo

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Ivory

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Khaki

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Lavender

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LavenderBlush

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LawnGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LemonChiffon

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightCoral

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightCyan

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightGoldenrodYellow

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightGray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightPink

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightSalmon

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightSeaGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightSkyBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightSlateGray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightSteelBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LightYellow

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Lime

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

LimeGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Linen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Magenta

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Maroon

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumAquamarine

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumOrchid

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumPurple

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumSeaGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumSlateBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumSpringGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumTurquoise

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MediumVioletRed

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MidnightBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MintCream

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

MistyRose

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Moccasin

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

NavajoWhite

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Navy

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

OldLace

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Olive

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

OliveDrab

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Orange

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

OrangeRed

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Orchid

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PaleGoldenrod

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PaleGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PaleTurquoise

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PaleVioletRed

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PapayaWhip

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PeachPuff

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Peru

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Pink

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Plum

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

PowderBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Purple

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Red

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

RosyBrown

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

RoyalBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SaddleBrown

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Salmon

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SandyBrown

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SeaGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SeaShell

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Sienna

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Silver

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SkyBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SlateBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SlateGray

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Snow

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SpringGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

SteelBlue

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Tan

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Teal

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Thistle

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Tomato

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Transparent

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Turquoise

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Violet

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Wheat

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

White

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

WhiteSmoke

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

Yellow

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

YellowGreen

寬度為 1 的系統定義 Pen 物件。A system-defined Pen object with a width of 1.

方法

Equals(Object)

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

(繼承來源 Object)
GetHashCode()

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

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
MemberwiseClone()

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

(繼承來源 Object)
ToString()

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

(繼承來源 Object)

適用於

另請參閱