System.Drawing.Drawing2D 命名空間

System.Drawing.Drawing2D 命名空間提供進階的二維和向量圖形功能。 The System.Drawing.Drawing2D namespace provides advanced two-dimensional and vector graphics functionality.



表示可調整的箭號形狀的線條端點。Represents an adjustable arrow-shaped line cap. 這個類別無法被繼承。This class cannot be inherited.


定義 LinearGradientBrush 物件的漸變圖樣。Defines a blend pattern for a LinearGradientBrush object. 這個類別無法被繼承。This class cannot be inherited.


定義用於多色漸層的變化色彩漸變之色彩和位置陣列。Defines arrays of colors and positions used for interpolating color blending in a multicolor gradient. 這個類別無法被繼承。This class cannot be inherited.


封裝自訂的使用者定義線條端點。Encapsulates a custom user-defined line cap.


表示圖形容器 (Container) 的內部資料。Represents the internal data of a graphics container. 當使用 GraphicsBeginContainer() 方法儲存 EndContainer(GraphicsContainer) 物件的狀態時,會使用這個類別。This class is used when saving the state of a Graphics object using the BeginContainer() and EndContainer(GraphicsContainer) methods. 這個類別無法被繼承。This class cannot be inherited.


表示一系列連接的直線和曲線。Represents a series of connected lines and curves. 這個類別無法被繼承。This class cannot be inherited.


提供在 GraphicsPath 中逐一查看子路徑,並測試每個子路徑中含有之形狀類型的功能。Provides the ability to iterate through subpaths in a GraphicsPath and test the types of shapes contained in each subpath. 這個類別無法被繼承。This class cannot be inherited.


表示 Graphics 物件的狀態。Represents the state of a Graphics object. 這個物件是由 Save() 方法的呼叫所傳回的。This object is returned by a call to the Save() methods. 這個類別無法被繼承。This class cannot be inherited.


使用規劃樣式、前景色彩和背景色彩來定義矩形筆刷。Defines a rectangular brush with a hatch style, a foreground color, and a background color. 這個類別無法被繼承。This class cannot be inherited.


使用線形漸層封裝 BrushEncapsulates a Brush with a linear gradient. 這個類別無法被繼承。This class cannot be inherited.


封裝代表幾何轉換的 3 乘 3 仿射矩陣。Encapsulates a 3-by-3 affine matrix that represents a geometric transform. 這個類別無法被繼承。This class cannot be inherited.


含有組成 GraphicsPath 物件的圖形資料。Contains the graphical data that makes up a GraphicsPath object. 這個類別無法被繼承。This class cannot be inherited.


封裝 Brush 物件,這個物件會使用漸層來填滿 GraphicsPath 物件的內部。Encapsulates a Brush object that fills the interior of a GraphicsPath object with a gradient. 這個類別無法被繼承。This class cannot be inherited.


封裝組成 Region 物件的資料。Encapsulates the data that makes up a Region object. 這個類別無法被繼承。This class cannot be inherited.



指定不同裁剪區域的組合方式。Specifies how different clipping regions can be combined.


指定來源色彩如何與背景色彩組合。Specifies how the source colors are combined with the background colors.


指定要在合成期間使用的品質等級。Specifies the quality level to use during compositing.


指定估算座標時所使用的系統。Specifies the system to use when evaluating coordinates.


指定要在短折線的每個破折號兩端使用的圖形形狀類型。Specifies the type of graphic shape to use on both ends of each dash in a dashed line.


指定使用 Pen 物件繪製的虛線樣式。Specifies the style of dashed lines drawn with a Pen object.


指定如何填滿關閉路徑的內部。Specifies how the interior of a closed path is filled.


指定是否立即結束 (清除) 或儘快執行在圖形堆疊中的命令。Specifies whether commands in the graphics stack are terminated (flushed) immediately or executed as soon as possible.


指定 HatchBrush 物件可用的不同花紋。Specifies the different patterns available for HatchBrush objects.


InterpolationMode 列舉型別會指定縮放或旋轉影像時所使用的演算法。The InterpolationMode enumeration specifies the algorithm that is used when images are scaled or rotated.


指定線形漸層的方向。Specifies the direction of a linear gradient.


指定 Pen 物件可以用來結束線條的可用端點樣式。Specifies the available cap styles with which a Pen object can end a line.


指定如何聯結包含在 GraphicsPath 物件的圖形 (子路徑) 中之連續直線或曲線線段。Specifies how to join consecutive line or curve segments in a figure (subpath) contained in a GraphicsPath object.


指定矩陣變換作業的順序。Specifies the order for matrix transform operations.


指定在 GraphicsPath 物件中的點類型。Specifies the type of point in a GraphicsPath object.


指定與假設的零寬度線條相關聯之 Pen 物件的對齊。Specifies the alignment of a Pen object in relation to the theoretical, zero-width line.


指定 Pen 物件用來填滿線條的填色類型。Specifies the type of fill a Pen object uses to fill lines.


指定在呈現期間像素如何位移。Specifies how pixels are offset during rendering.


指定呈現 GDI+ 物件時的整體品質。Specifies the overall quality when rendering GDI+ objects.


指定平滑處理 (反鋸齒補償) 是否套用至直線和曲線,以及填滿的區域的邊緣。Specifies whether smoothing (antialiasing) is applied to lines and curves and the edges of filled areas.


指定 Warp 方法中所套用的彎曲變換。Specifies the type of warp transformation applied in a Warp method.


指定在紋理或漸層小於要填滿的區域時的拼接方式。Specifies how a texture or gradient is tiled when it is smaller than the area being filled.


下表列出一些重要類別和列舉型別中的System.Drawing.Drawing2D命名空間,按照類別分組。The following table lists some of the important classes and enumerations in the System.Drawing.Drawing2D namespace, grouped into categories.

類別的類別目錄Class category 詳細資訊Details
-圖形和圖形路徑- Graphics and Graphics paths GraphicsStateGraphicsContainer類別會報告有關目前Graphics物件。The GraphicsState and GraphicsContainer classes report information about the current Graphics object. GraphicsPath 類別代表一系列的線條和曲線。GraphicsPath classes represent a series of lines and curves. GraphicsPathIteratorPathData類別提供的內容的詳細的資訊GraphicsPath物件。The GraphicsPathIterator and PathData classes provide detailed information about the contents of a GraphicsPath object.
-矩陣與轉換相關的類型- Matrix and transformation related types Matrix類別代表幾何轉換的矩陣。The Matrix class represents a matrix for geometric transforms. MatrixOrder列舉會指定針對矩陣轉換的順序。The MatrixOrder enumeration specifies the order for matrix transformations.
-筆刷類別- Brush classes PathGradientBrushHatchBrush類別可讓您分別與漸層或規劃圖樣填滿形狀。The PathGradientBrush and HatchBrush classes enable you to fill shapes with either a gradient, or hatch pattern, respectively.
-列舉相關行- Enumeration related to lines LineCapCustomLineCap列舉可讓您指定線條的端點樣式。The LineCap and CustomLineCap enumerations enable you to specify cap styles for a line. LineJoin列舉可讓您指定如何兩行已加入路徑中。The, LineJoin enumeration enables you to specify how two lines are joined in a path. PenAlignment列舉可讓您繪製一條線時,指定繪製小費的對齊方式。The PenAlignment enumeration enables you specify the alignment of the drawing tip, when you draw a line. PenType列舉型別指定一條線應該填入的模式。The PenType enumeration specifies the pattern a line should be filled with.
列舉與填滿圖案與路徑- Enumerations related to filling shapes and paths HatchStyle列舉會指定填滿樣式HatchBrushThe HatchStyle enumeration specifies fill styles for a HatchBrush. Blend類別會指定的漸變圖樣LinearGradientBrushThe Blend class specifies a blend pattern for a LinearGradientBrush. FillMode列舉指定的填滿樣式GraphicsPathThe FillMode enumeration specifies the fill style for a GraphicsPath.


中的類別System.Drawing.Drawing2D命名空間不支援在 Windows 中使用或ASP.NETASP.NET服務。Classes in the System.Drawing.Drawing2D namespace are not supported for use in a Windows or ASP.NETASP.NET service. 嘗試在其中一個應用程式類型中使用這些類別可能會產生非預期的問題,例如降低的服務效能和執行階段例外狀況。Attempting to use these classes in one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.