System.Drawing 命名空間

System.Drawing 命名空間提供對 GDI+ 基本繪圖功能的存取。 The System.Drawing namespace provides access to GDI+ basic graphics functionality. System.Drawing.Drawing2DSystem.Drawing.ImagingSystem.Drawing.Text 命名空間提供更多進階功能。 More advanced functionality is provided in the System.Drawing.Drawing2D, System.Drawing.Imaging, and System.Drawing.Text namespaces.

類別

Bitmap

封裝 GDI+ 點陣圖,這個點陣圖是由圖形影像的像素資料及其屬性所組成。Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes. Bitmap 是用來處理像素資料所定義影像的物件。A Bitmap is an object used to work with images defined by pixel data.

BitmapSuffixInSameAssemblyAttribute

指定,當解譯 ToolboxBitmapAttribute 宣告時,組件應該尋找相同組件中的指定資源,但是這個組件的宣告檔案名稱有附加 BitmapSuffix 組態值。Specifies that, when interpreting ToolboxBitmapAttribute declarations, the assembly should look for the indicated resources in the same assembly, but with the BitmapSuffix configuration value appended to the declared file name.

BitmapSuffixInSatelliteAssemblyAttribute

指定,當解譯 ToolboxBitmapAttribute 宣告時,組件應該尋找附屬組件中的指定資源,但是這個組件的宣告檔案名稱有附加 BitmapSuffix 組態值。Specifies that, when interpreting ToolboxBitmapAttribute declarations, the assembly should look for the indicated resources in a satellite assembly, but with the BitmapSuffix configuration value appended to the declared file name.

Brush

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

Brushes

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

BufferedGraphics

提供雙重緩衝 (Double Buffering) 的圖形緩衝區。Provides a graphics buffer for double buffering.

BufferedGraphicsContext

提供建立圖形緩衝區的方法,該緩衝區可用於雙重緩衝 (Double Buffering)。Provides methods for creating graphics buffers that can be used for double buffering.

BufferedGraphicsManager

提供對應用程式定義域之主要緩衝圖形內容物件的存取。Provides access to the main buffered graphics context object for the application domain.

ColorConverter

將色彩從某資料型別轉換為其他資料型別。Converts colors from one data type to another. 這個類別可透過 TypeDescriptor 來存取。Access this class through the TypeDescriptor.

ColorTranslator

在色彩和 GDI+ Color 結構之間來回轉換。Translates colors to and from GDI+ Color structures. 這個類別無法被繼承。This class cannot be inherited.

Font

定義文字的特定格式,包括字體、大小和樣式屬性 (Attribute)。Defines a particular format for text, including font face, size, and style attributes. 這個類別無法被繼承。This class cannot be inherited.

FontConverter

Font 物件從一個資料型別轉換為另一個資料型別。Converts Font objects from one data type to another.

FontConverter.FontNameConverter

FontConverter.FontNameConverter 是型別轉換子 (Type Converter),用於在字型名稱和各種其他表示之間來回轉換。FontConverter.FontNameConverter is a type converter that is used to convert a font name to and from various other representations.

FontConverter.FontUnitConverter

將字型單位與其他單位類型來回轉換。Converts font units to and from other unit types.

FontFamily

定義具有相似基本設計和特定樣式變化的字體群組。Defines a group of type faces having a similar basic design and certain variations in styles. 這個類別無法被繼承。This class cannot be inherited.

Graphics

封裝 GDI+ 繪圖介面。Encapsulates a GDI+ drawing surface. 這個類別無法被繼承。This class cannot be inherited.

Icon

表示 Windows 圖示,這個圖示為用來表示物件的小型點陣圖影像。Represents a Windows icon, which is a small bitmap image that is used to represent an object. 雖然圖示的大小是由系統決定,但是圖示仍然可以視為透明的點陣圖。Icons can be thought of as transparent bitmaps, although their size is determined by the system.

IconConverter

Icon 物件從某一個資料型別轉換為另一個資料型別。Converts an Icon object from one data type to another. 這個類別可透過 TypeDescriptor 物件來存取。Access this class through the TypeDescriptor object.

Image

提供功能給 BitmapMetafile 子代類別的抽象基底類別。An abstract base class that provides functionality for the Bitmap and Metafile descended classes.

ImageAnimator

顯示具有以時間為基礎的框架 (Frame) 的影像動畫。Animates an image that has time-based frames.

ImageConverter

ImageConverter 為類別,可用來將 Image 物件從一種資料型別轉換成另一種資料型別。ImageConverter is a class that can be used to convert Image objects from one data type to another. 這個類別可透過 TypeDescriptor 物件來存取。Access this class through the TypeDescriptor object.

ImageFormatConverter

ImageFormatConverter 為類別,可用來將 ImageFormat 物件從一種資料型別轉換成另一種資料型別。ImageFormatConverter is a class that can be used to convert ImageFormat objects from one data type to another. 這個類別可透過 TypeDescriptor 物件來存取。Access this class through the TypeDescriptor object.

Pen

定義用來繪製直線與曲線的物件。Defines an object used to draw lines and curves. 這個類別無法被繼承。This class cannot be inherited.

Pens

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

PointConverter

Point 物件從某一個資料型別轉換為另一個資料型別。Converts a Point object from one data type to another.

RectangleConverter

將矩形從某一資料型別轉換為另一資料型別。Converts rectangles from one data type to another. 這個類別可透過 TypeDescriptor 來存取。Access this class through the TypeDescriptor.

Region

描述由矩形和路徑構成的圖形形狀內部。Describes the interior of a graphics shape composed of rectangles and paths. 這個類別無法被繼承。This class cannot be inherited.

SizeConverter

SizeConverter 類別是用來將某一種資料型別轉換成另一種資料型別。The SizeConverter class is used to convert from one data type to another. 這個類別可透過 TypeDescriptor 物件來存取。Access this class through the TypeDescriptor object.

SizeFConverter

SizeF 物件從一個型別轉換為另一個型別。Converts SizeF objects from one type to another.

SolidBrush

定義單一色彩的筆刷。Defines a brush of a single color. 筆刷是用來填滿圖形形狀,例如矩形、橢圓形、派形、多邊形和路徑。Brushes are used to fill graphics shapes, such as rectangles, ellipses, pies, polygons, and paths. 這個類別無法被繼承。This class cannot be inherited.

StringFormat

封裝文字配置資訊 (例如對齊、方向和定位停駐點)、顯示管理 (例如省略符號插入和國家數字取代) 和 OpenType 功能。Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulations (such as ellipsis insertion and national digit substitution) and OpenType features. 這個類別無法被繼承。This class cannot be inherited.

SystemBrushes

SystemBrushes 類別的每個屬性是 SolidBrush,其為 Windows 顯示項目的色彩。Each property of the SystemBrushes class is a SolidBrush that is the color of a Windows display element.

SystemColors

SystemColors 類別的每個屬性是 Color 結構,這個結構為 Windows 顯示項目的色彩。Each property of the SystemColors class is a Color structure that is the color of a Windows display element.

SystemFonts

指定用於顯示 Windows 顯示項目中文字的字型。Specifies the fonts used to display text in Windows display elements.

SystemIcons

SystemIcons 類別的每一個屬性皆為整個 Windows 系統圖示的 Icon 物件。Each property of the SystemIcons class is an Icon object for Windows system-wide icons. 這個類別無法被繼承。This class cannot be inherited.

SystemPens

SystemPens 類別的每個屬性都是 Pen,其為 Windows 顯示項目的色彩,並且寬度為 1 像素。Each property of the SystemPens class is a Pen that is the color of a Windows display element and that has a width of 1 pixel.

TextureBrush

TextureBrush 類別的每一個屬性都是 Brush 物件,這個物件會使用影像來填滿形狀的內部。Each property of the TextureBrush class is a Brush object that uses an image to fill the interior of a shape. 這個類別無法被繼承。This class cannot be inherited.

ToolboxBitmapAttribute

可讓您指定圖示以表示容器中的控制項,例如 Microsoft Visual Studio 表單設計工具。Allows you to specify an icon to represent a control in a container, such as the Microsoft Visual Studio Form Designer.

結構

CharacterRange

指定字串中的字元位置範圍。Specifies a range of character positions within a string.

Color

表示 ARGB (Alpha、紅、綠、藍) 色彩。Represents an ARGB (alpha, red, green, blue) color.

Point

表示整數 X 和 Y 座標之已排序的配對,此配對會定義二維平面中的點。Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.

PointF

表示浮點 X 和 Y 座標的排序配對,該配對會定義二維平面中的點。Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.

Rectangle

儲存四個為一組的整數,代表矩形的位置和大小。Stores a set of four integers that represent the location and size of a rectangle.

RectangleF

儲存四個為一組的浮點數值 (Floating-Point Number),表示矩形的位置和大小。Stores a set of four floating-point numbers that represent the location and size of a rectangle. 如需更多進階的區域函式,請使用 Region 物件。For more advanced region functions, use a Region object.

Size

儲存一對已排序的整數,指定 HeightWidthStores an ordered pair of integers, which specify a Height and Width.

SizeF

儲存已排序的浮點數值 (Floating-Point Number) 配對,通常是矩形的寬度和高度。Stores an ordered pair of floating-point numbers, typically the width and height of a rectangle.

介面

IDeviceContext

定義取得和釋放 Windows 裝置内容的現有控制代碼的方法。Defines methods for obtaining and releasing an existing handle to a Windows device context.

列舉

ContentAlignment

指定在繪圖表面上的內容對齊。Specifies alignment of content on the drawing surface.

CopyPixelOperation

判斷在像素複製作業中來源色彩如何與目的色彩結合以產生最後的色彩。Determines how the source color in a copy pixel operation is combined with the destination color to result in a final color.

FontStyle

指定要套用至文字的樣式資訊。Specifies style information applied to text.

GraphicsUnit

指定所指定資料的測量單位。Specifies the unit of measure for the given data.

KnownColor

指定已知的系統色彩。Specifies the known system colors.

RotateFlipType

指定影像的旋轉量以及用來翻轉影像的座標軸。Specifies how much an image is rotated and the axis used to flip the image.

StringAlignment

指定相對於文字字串之配置矩形的文字字串對齊。Specifies the alignment of a text string relative to its layout rectangle.

StringDigitSubstitute

StringDigitSubstitute 列舉型別會指定如何根據使用者的地區設定 (Locale) 或語言來取代字串中的數字。The StringDigitSubstitute enumeration specifies how to substitute digits in a string according to a user's locale or language.

StringFormatFlags

指定文字字串的顯示和配置資訊。Specifies the display and layout information for text strings.

StringTrimming

指定如何從不符合配置形狀的字串修剪字元。Specifies how to trim characters from a string that does not completely fit into a layout shape.

StringUnit

指定文字字串的測量單位。Specifies the units of measure for a text string.

委派

Graphics.DrawImageAbort

提供回呼 (Callback) 方法來決定 DrawImage 方法應該在何時提前取消執行並停止繪製影像。Provides a callback method for deciding when the DrawImage method should prematurely cancel execution and stop drawing an image.

Graphics.EnumerateMetafileProc

提供回呼 (Callback) 方法給 EnumerateMetafile 方法。Provides a callback method for the EnumerateMetafile method.

Image.GetThumbnailImageAbort

提供回呼 (Callback) 方法來判斷 GetThumbnailImage(Int32, Int32, Image+GetThumbnailImageAbort, IntPtr) 方法何時應該提前取消執行。Provides a callback method for determining when the GetThumbnailImage(Int32, Int32, Image+GetThumbnailImageAbort, IntPtr) method should prematurely cancel execution.

備註

Graphics類別提供方法來繪製至顯示裝置。The Graphics class provides methods for drawing to the display device. 這類類別RectanglePoint封裝 GDI + 基本類型。Classes such as Rectangle and Point encapsulate GDI+ primitives. Pen類別會用來繪製的直線和曲線,衍生自抽象類別的類別時Brush用來填滿的形狀內部。The Pen class is used to draw lines and curves, while classes derived from the abstract class Brush are used to fill the interiors of shapes.

警告

類別內System.Drawing命名空間不支援在 Windows 或 ASP.NET 服務中使用。Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. 嘗試使用這些類別內其中一個應用程式類型可能會產生非預期的問題,例如會受到影響服務效能和執行階段例外狀況。Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. 如需支援的替代方法,請參閱Windows Imaging 元件For a supported alternative, see Windows Imaging Components.