System.Drawing.Drawing2D Namespace

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.


表示图形容器的内部数据。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.


封装表示几何变换的 3x3 仿射矩阵。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.