System.Drawing Namespace

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

为双缓冲提供图形缓冲区。Provides a graphics buffer for double buffering.

BufferedGraphicsContext

提供创建图形缓冲区的方法,该缓冲区可用于双缓冲。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

定义特定的文本格式,包括字体、字号和样式特性。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 是一个类型转换器,用于在字体名称与其他各种表示形式之间进行转换。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

动画处理包含基于时间的帧的图像。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

封装文本布局信息(如对齐、文字方向和 Tab 停靠位),显示操作(如省略号插入和国家标准 (National) 数字替换)和 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

存储一组浮点数,共四个,表示一个矩形的位置和大小。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

存储有序浮点数对,通常为矩形的宽度和高度。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 枚举指定如何按照用户的区域设置或语言替换字符串中的数字位。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

提供一个回调方法,用于决定 DrawImage 方法应何时过早地取消执行并停止绘制图像。Provides a callback method for deciding when the DrawImage method should prematurely cancel execution and stop drawing an image.

Graphics.EnumerateMetafileProc

EnumerateMetafile 方法提供回调方法。Provides a callback method for the EnumerateMetafile method.

Image.GetThumbnailImageAbort

提供一个回叫方法,用于确定 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 图像处理组件For a supported alternative, see Windows Imaging Components.