C#学习之GDI + 图形编程基础(二)

graphics类
        graphics类的命名空间为:System.Drawing。程序集为System.Drawing(在system.drawing.dll中)。

------------graphics类属性

  名称 描述
公共属性 Clip 获取或设置 Region,它限定此 Graphics 的绘图区域。
公共属性 ClipBounds 获取一个 RectangleF 结构,该结构限定此 Graphics 的剪辑区域。
公共属性 CompositingMode 获取一个值,该值指定如何将合成图像绘制到此 Graphics
公共属性 CompositingQuality 获取或设置绘制到此 Graphics 的合成图像的呈现质量。
公共属性 DpiX 获取此 Graphics 的水平分辨率。
公共属性 DpiY 获取此 Graphics 的垂直分辨率。
公共属性 InterpolationMode 获取或设置与此 Graphics 关联的插补模式。
公共属性 IsClipEmpty 获取一个值,该值指示此 Graphics 的剪辑区域是否为空。
公共属性 IsVisibleClipEmpty 获取一个值,该值指示此 Graphics 的可见剪辑区域是否为空。
公共属性 PageScale 获取或设置此 Graphics 的世界单位和页单位之间的比例。
公共属性 PageUnit 获取或设置用于此 Graphics 中的页坐标的度量单位。
公共属性 PixelOffsetMode 获取或设置一个值,该值指定在呈现此 Graphics 的过程中像素如何偏移。
公共属性 RenderingOrigin 为抵色处理和阴影画笔获取或设置此 Graphics 的呈现原点。
公共属性 SmoothingMode 获取或设置此 Graphics 的呈现质量。
公共属性 TextContrast 获取或设置呈现文本的灰度校正值。
公共属性 TextRenderingHint 获取或设置与此 Graphics 关联的文本的呈现模式。
公共属性 Transform 获取或设置此 Graphics 的几何世界变换的副本。
公共属性 VisibleClipBounds 获取此 Graphics 的可见剪辑区域的边框。

---------graphics类方法

  名称 描述
公共方法 AddMetafileComment 向当前 Metafile 添加注释。
公共方法 BeginContainer() 保存具有此 Graphics 的当前状态的图形容器,然后打开并使用新的图形容器。
公共方法 BeginContainer(Rectangle, Rectangle, GraphicsUnit) 保存具有此 Graphics 的当前状态的图形容器,然后打开并使用具有指定缩放变形的新图形容器。
公共方法 BeginContainer(RectangleF, RectangleF, GraphicsUnit) 保存具有此 Graphics 的当前状态的图形容器,然后打开并使用具有指定缩放变形的新图形容器。
公共方法 Clear 清除整个绘图面并以指定背景色填充。
公共方法 CopyFromScreen(Point, Point, Size) 执行颜色数据(对应于由像素组成的矩形)从屏幕到 Graphics 的绘图图面的位块传输。
公共方法 CopyFromScreen(Point, Point, Size, CopyPixelOperation) 执行颜色数据(对应于由像素组成的矩形)从屏幕到 Graphics 的绘图图面的位块传输。
公共方法 CopyFromScreen(Int32, Int32, Int32, Int32, Size) 执行颜色数据(对应于由像素组成的矩形)从屏幕到 Graphics 的绘图图面的位块传输。
公共方法 CopyFromScreen(Int32, Int32, Int32, Int32, Size, CopyPixelOperation) 执行颜色数据(对应于由像素组成的矩形)从屏幕到 Graphics 的绘图图面的位块传输。
公共方法 CreateObjRef 创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。(继承自 MarshalByRefObject。)
公共方法 Dispose 释放此 Graphics 使用的所有资源。
公共方法 DrawArc(Pen, Rectangle, Single, Single) 绘制一段弧线,它表示 Rectangle 结构指定的椭圆的一部分。
公共方法 DrawArc(Pen, RectangleF, Single, Single) 绘制一段弧线,它表示 RectangleF 结构指定的椭圆的一部分。
公共方法 DrawArc(Pen, Int32, Int32, Int32, Int32, Int32, Int32) 绘制一段弧线,它表示由一对坐标、宽度和高度指定的椭圆部分。
公共方法 DrawArc(Pen, Single, Single, Single, Single, Single, Single) 绘制一段弧线,它表示由一对坐标、宽度和高度指定的椭圆部分。
公共方法 DrawBezier(Pen, Point, Point, Point, Point) 绘制由 4 个 Point 结构定义的贝塞尔样条。
公共方法 DrawBezier(Pen, PointF, PointF, PointF, PointF) 绘制由 4 个 PointF 结构定义的贝塞尔样条。
公共方法 DrawBezier(Pen, Single, Single, Single, Single, Single, Single, Single, Single) 绘制由四个表示点的有序坐标对定义的贝塞尔样条。
公共方法 DrawBeziers(Pen, Point[]) 用 Point 结构数组绘制一系列贝塞尔样条。
公共方法 DrawBeziers(Pen, PointF[]) 用 PointF 结构数组绘制一系列贝塞尔样条。
公共方法 DrawClosedCurve(Pen, Point[]) 绘制由 Point 结构的数组定义的闭合基数样条。
公共方法 DrawClosedCurve(Pen, PointF[]) 绘制由 PointF 结构的数组定义的闭合基数样条。
公共方法 DrawClosedCurve(Pen, Point[], Single, FillMode) 使用指定的张力绘制由 Point 结构数组定义的闭合基数样条。
公共方法 DrawClosedCurve(Pen, PointF[], Single, FillMode) 使用指定的张力绘制由 PointF 结构数组定义的闭合基数样条。
公共方法 DrawCurve(Pen, Point[]) 绘制经过一组指定的 Point 结构的基数样条。
公共方法 DrawCurve(Pen, PointF[]) 绘制经过一组指定的 PointF 结构的基数样条。
公共方法 DrawCurve(Pen, Point[], Single) 使用指定的张力绘制经过一组指定的 Point 结构的基数样条。
公共方法 DrawCurve(Pen, PointF[], Single) 使用指定的张力绘制经过一组指定的 PointF结构的基数样条。
公共方法 DrawCurve(Pen, PointF[], Int32, Int32) 绘制经过一组指定的 PointF 结构的基数样条。 从相对于数组开始位置的偏移量开始绘制。
公共方法 DrawCurve(Pen, Point[], Int32, Int32, Single) 使用指定的张力绘制经过一组指定的 Point 结构的基数样条。
公共方法 DrawCurve(Pen, PointF[], Int32, Int32, Single) 使用指定的张力绘制经过一组指定的 PointF结构的基数样条。 从相对于数组开始位置的偏移量开始绘制。
公共方法 DrawEllipse(Pen, Rectangle) 绘制边界 Rectangle 结构指定的椭圆。
公共方法 DrawEllipse(Pen, RectangleF) 绘制边界 RectangleF 定义的椭圆。
公共方法 DrawEllipse(Pen, Int32, Int32, Int32, Int32) 绘制一个由边框定义的椭圆,该边框由矩形的左上角坐标、高度和宽度指定。
公共方法 DrawEllipse(Pen, Single, Single, Single, Single) 绘制一个由边框(该边框由一对坐标、高度和宽度指定)定义的椭圆。
公共方法 DrawIcon(Icon, Rectangle) 在 Icon 结构指定的区域内绘制指定的Rectangle 表示的图像。
公共方法 DrawIcon(Icon, Int32, Int32) 在指定坐标处绘制由指定的 Icon 表示的图像。
公共方法 DrawIconUnstretched 绘制指定的 Icon 表示的图像,而不缩放该图像。
公共方法 DrawImage(Image, Point) 在指定的位置使用原始物理大小绘制指定的Image
公共方法 DrawImage(Image, Point[]) 在指定位置并且按指定形状和大小绘制指定的Image
公共方法 DrawImage(Image, PointF) 在指定的位置使用原始物理大小绘制指定的Image
公共方法 DrawImage(Image, PointF[]) 在指定位置并且按指定形状和大小绘制指定的Image
公共方法 DrawImage(Image, Rectangle) 在指定位置并且按指定大小绘制指定的Image
公共方法 DrawImage(Image, RectangleF) 在指定位置并且按指定大小绘制指定的Image
公共方法 DrawImage(Image, Int32, Int32) 在由坐标对指定的位置,使用图像的原始物理大小绘制指定的图像。
公共方法 DrawImage(Image, Single, Single) 在指定的位置使用原始物理大小绘制指定的Image
公共方法 DrawImage(Image, Point[], Rectangle, GraphicsUnit) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, PointF[], RectangleF, GraphicsUnit) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Rectangle, GraphicsUnit) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, RectangleF, RectangleF, GraphicsUnit) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes) 在指定位置绘制指定的 Image 的指定部分。
公共方法 DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Int32, Int32, Rectangle, GraphicsUnit) 在指定的位置绘制图像的一部分。
公共方法 DrawImage(Image, Int32, Int32, Int32, Int32) 在指定位置并且按指定大小绘制指定的Image
公共方法 DrawImage(Image, Single, Single, RectangleF, GraphicsUnit) 在指定的位置绘制图像的一部分。
公共方法 DrawImage(Image, Single, Single, Single, Single) 在指定位置并且按指定大小绘制指定的Image
公共方法 DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort, Int32) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, PointF[], RectangleF, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort, Int32) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Single, Single, Single, Single, GraphicsUnit) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit, ImageAttributes) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Single, Single, Single, Single, GraphicsUnit, ImageAttributes) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Single, Single, Single, Single, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort, IntPtr) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImage(Image, Rectangle, Single, Single, Single, Single, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort, IntPtr) 在指定位置并且按指定大小绘制指定的Image 的指定部分。
公共方法 DrawImageUnscaled(Image, Point) 在指定的位置使用图像的原始物理大小绘制指定的图像。
公共方法 DrawImageUnscaled(Image, Rectangle) 在指定的位置使用图像的原始物理大小绘制指定的图像。
公共方法 DrawImageUnscaled(Image, Int32, Int32) 在由坐标对指定的位置,使用图像的原始物理大小绘制指定的图像。
公共方法 DrawImageUnscaled(Image, Int32, Int32, Int32, Int32) 在指定的位置使用图像的原始物理大小绘制指定的图像。
公共方法 DrawImageUnscaledAndClipped 在不进行缩放的情况下绘制指定的图像,并在需要时剪辑该图像以适合指定的矩形。
公共方法 DrawLine(Pen, Point, Point) 绘制一条连接两个 Point 结构的线。
公共方法 DrawLine(Pen, PointF, PointF) 绘制一条连接两个 PointF 结构的线。
公共方法 DrawLine(Pen, Int32, Int32, Int32, Int32) 绘制一条连接由坐标对指定的两个点的线条。
公共方法 DrawLine(Pen, Single, Single, Single, Single) 绘制一条连接由坐标对指定的两个点的线条。
公共方法 DrawLines(Pen, Point[]) 绘制一系列连接一组 Point 结构的线段。
公共方法 DrawLines(Pen, PointF[]) 绘制一系列连接一组 PointF 结构的线段。
公共方法 DrawPath 绘制 GraphicsPath
公共方法 DrawPie(Pen, Rectangle, Single, Single) 绘制由一个 Rectangle 结构和两条射线所指定的椭圆定义的扇形。
公共方法 DrawPie(Pen, RectangleF, Single, Single) 绘制由一个 RectangleF 结构和两条射线所指定的椭圆定义的扇形。
公共方法 DrawPie(Pen, Int32, Int32, Int32, Int32, Int32, Int32) 绘制一个扇形,该形状由一个坐标对、宽度、高度以及两条射线所指定的椭圆定义。
公共方法 DrawPie(Pen, Single, Single, Single, Single, Single, Single) 绘制一个扇形,该形状由一个坐标对、宽度、高度以及两条射线所指定的椭圆定义。
公共方法 DrawPolygon(Pen, Point[]) 绘制由一组 Point 结构定义的多边形。
公共方法 DrawPolygon(Pen, PointF[]) 绘制由一组 PointF 结构定义的多边形。
公共方法 DrawRectangle(Pen, Rectangle) 绘制由 Rectangle 结构指定的矩形。
公共方法 DrawRectangle(Pen, Int32, Int32, Int32, Int32) 绘制由坐标对、宽度和高度指定的矩形。
公共方法 DrawRectangle(Pen, Single, Single, Single, Single) 绘制由坐标对、宽度和高度指定的矩形。
公共方法 DrawRectangles(Pen, Rectangle[]) 绘制一系列由 Rectangle 结构指定的矩形。
公共方法 DrawRectangles(Pen, RectangleF[]) 绘制一系列由 RectangleF 结构指定的矩形。
公共方法 DrawString(String, Font, Brush, PointF) 在指定位置并且用指定的 Brush 和 Font 对象绘制指定的文本字符串。
公共方法 DrawString(String, Font, Brush, RectangleF) 在指定矩形并且用指定的 Brush 和 Font 对象绘制指定的文本字符串。
公共方法 DrawString(String, Font, Brush, PointF, StringFormat) 使用指定 StringFormat 的格式化特性,用指定的 Brush 和 Font 对象在指定的位置绘制指定的文本字符串。
公共方法 DrawString(String, Font, Brush, RectangleF, StringFormat) 使用指定 StringFormat 的格式化特性,用指定的 Brush 和 Font 对象在指定的矩形中绘制指定的文本字符串。
公共方法 DrawString(String, Font, Brush, Single, Single) 在指定位置并且用指定的 Brush 和 Font 对象绘制指定的文本字符串。
公共方法 DrawString(String, Font, Brush, Single, Single, StringFormat) 使用指定 StringFormat 的格式化特性,用指定的 Brush 和 Font 对象在指定的位置绘制指定的文本字符串。
公共方法 EndContainer 关闭当前图形容器,并将此 Graphics 的状态还原到通过调用 BeginContainer 方法保存的状态。
公共方法 EnumerateMetafile(Metafile, Point, Graphics.EnumerateMetafileProc) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, Point[], Graphics.EnumerateMetafileProc) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, PointF, Graphics.EnumerateMetafileProc) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, PointF[], Graphics.EnumerateMetafileProc) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, Rectangle, Graphics.EnumerateMetafileProc) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, RectangleF, Graphics.EnumerateMetafileProc) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, Point, Graphics.EnumerateMetafileProc, IntPtr) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, Point[], Graphics.EnumerateMetafileProc, IntPtr) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, PointF, Graphics.EnumerateMetafileProc, IntPtr) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, PointF[], Graphics.EnumerateMetafileProc, IntPtr) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, Rectangle, Graphics.EnumerateMetafileProc, IntPtr) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, RectangleF, Graphics.EnumerateMetafileProc, IntPtr) 将指定 Metafile 中的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, Point, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将指定 Metafile 中的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, Point[], Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将指定 Metafile 中的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, PointF, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将指定 Metafile 中的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, PointF[], Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将指定 Metafile 中的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, Rectangle, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将指定 Metafile 中的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, RectangleF, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将指定 Metafile 中的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的点处显示。
公共方法 EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的平行四边形中显示。
公共方法 EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr) 将 Metafile 中选定矩形内的记录逐个发送到回调方法以在指定的矩形中显示。
公共方法 EnumerateMetafile(Metafile, Point, Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将 Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, Point[], Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将 Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, PointF, RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将 Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的点处用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, PointF[], RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将 Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的平行四边形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, Rectangle, Rectangle, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将 Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。
公共方法 EnumerateMetafile(Metafile, RectangleF, RectangleF, GraphicsUnit, Graphics.EnumerateMetafileProc, IntPtr, ImageAttributes) 将 Metafile 中选定矩形内的记录逐个发送到回调方法,以在指定的矩形中用指定的图像特性显示。
公共方法 Equals(Object) 确定指定的对象是否等于当前对象。 (继承自 Object。)
公共方法 ExcludeClip(Rectangle) 更新此 Graphics 的剪辑区域,以排除Rectangle 结构所指定的区域。
公共方法 ExcludeClip(Region) 更新此 Graphics 的剪辑区域,以排除Region 所指定的区域。
公共方法 FillClosedCurve(Brush, Point[]) 填充由 Point 结构数组定义的闭合基数样条曲线的内部。
公共方法 FillClosedCurve(Brush, PointF[]) 填充由 PointF 结构数组定义的闭合基数样条曲线的内部。
公共方法 FillClosedCurve(Brush, Point[], FillMode) 使用指定的填充模式填充 Point 结构数组定义的闭合基数样条曲线的内部。
公共方法 FillClosedCurve(Brush, PointF[], FillMode) 使用指定的填充模式填充 PointF 结构数组定义的闭合基数样条曲线的内部。
公共方法 FillClosedCurve(Brush, Point[], FillMode, Single) 使用指定的填充模式和张力填充 Point 结构数组定义的闭合基数样条曲线的内部。
公共方法 FillClosedCurve(Brush, PointF[], FillMode, Single) 使用指定的填充模式和张力填充 PointF 结构数组定义的闭合基数样条曲线的内部。
公共方法 FillEllipse(Brush, Rectangle) 填充 Rectangle 结构指定的边框所定义的椭圆的内部。
公共方法 FillEllipse(Brush, RectangleF) 填充 RectangleF 结构指定的边框所定义的椭圆的内部。
公共方法 FillEllipse(Brush, Int32, Int32, Int32, Int32) 填充边框所定义的椭圆的内部,该边框由一对坐标、一个宽度和一个高度指定。
公共方法 FillEllipse(Brush, Single, Single, Single, Single) 填充边框所定义的椭圆的内部,该边框由一对坐标、一个宽度和一个高度指定。
公共方法 FillPath 填充 GraphicsPath 的内部。
公共方法 FillPie(Brush, Rectangle, Single, Single) 填充椭圆所定义的扇形区的内部,该椭圆由RectangleF 结构和两条射线指定。
公共方法 FillPie(Brush, Int32, Int32, Int32, Int32, Int32, Int32) 填充由一对坐标、一个宽度、一个高度以及两条射线指定的椭圆所定义的扇形区的内部。
公共方法 FillPie(Brush, Single, Single, Single, Single, Single, Single) 填充由一对坐标、一个宽度、一个高度以及两条射线指定的椭圆所定义的扇形区的内部。
公共方法 FillPolygon(Brush, Point[]) 填充 Point 结构指定的点数组所定义的多边形的内部。
公共方法 FillPolygon(Brush, PointF[]) 填充 PointF 结构指定的点数组所定义的多边形的内部。
公共方法 FillPolygon(Brush, Point[], FillMode) 使用指定的填充模式填充 Point 结构指定的点数组所定义的多边形的内部。
公共方法 FillPolygon(Brush, PointF[], FillMode) 使用指定的填充模式填充 PointF 结构指定的点数组所定义的多边形的内部。
公共方法 FillRectangle(Brush, Rectangle) 填充 Rectangle 结构指定的矩形的内部。
公共方法 FillRectangle(Brush, RectangleF) 填充 RectangleF 结构指定的矩形的内部。
公共方法 FillRectangle(Brush, Int32, Int32, Int32, Int32) 填充由一对坐标、一个宽度和一个高度指定的矩形的内部。
公共方法 FillRectangle(Brush, Single, Single, Single, Single) 填充由一对坐标、一个宽度和一个高度指定的矩形的内部。
公共方法 FillRectangles(Brush, Rectangle[]) 填充由 Rectangle 结构指定的一系列矩形的内部。
公共方法 FillRectangles(Brush, RectangleF[]) 填充由 RectangleF 结构指定的一系列矩形的内部。
公共方法 FillRegion 填充 Region 的内部。
受保护的方法 Finalize 在垃圾回收将某一对象回收前允许该对象尝试释放资源并执行其他清理操作。 (重写Object.Finalize()。)
公共方法 Flush() 强制执行所有挂起的图形操作并立即返回而不等待操作完成。
公共方法 Flush(FlushIntention) 用此方法强制执行所有挂起的图形操作,按照指定,等待或者不等待,在操作完成之前返回。
公共方法静态成员 FromHdc(IntPtr) 从设备上下文的指定句柄创建新的Graphics
公共方法静态成员 FromHdc(IntPtr, IntPtr) 从设备上下文的指定句柄和设备的句柄创建新的 Graphics
公共方法静态成员 FromHdcInternal 基础结构。 返回指定设备上下文的Graphics
公共方法静态成员 FromHwnd 从窗口的指定句柄创建新的 Graphics
公共方法静态成员 FromHwndInternal 基础结构。 创建指定 Windows 句柄的新Graphics
公共方法静态成员 FromImage 从指定的 Image 创建新的 Graphics
公共方法 GetContextInfo 基础结构。 获取累积的图形上下文。
公共方法静态成员 GetHalftonePalette 获取当前 Windows 的半色调调色板的句柄。
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetHdc 获取与此 Graphics 关联的设备上下文的句柄。
公共方法 GetLifetimeService 检索控制此实例的生存期策略的当前生存期服务对象。 (继承自MarshalByRefObject。)
公共方法 GetNearestColor 获取与指定的 Color 结构最接近的颜色。
公共方法 GetType 获取当前实例的 Type (继承自Object。)
公共方法 InitializeLifetimeService 获取控制此实例的生存期策略的生存期服务对象。 (继承自 MarshalByRefObject。)
公共方法 IntersectClip(Rectangle) 将此 Graphics 的剪辑区域更新为当前剪辑区域与指定 Rectangle 结构的交集。
公共方法 IntersectClip(RectangleF) 将此 Graphics 的剪辑区域更新为当前剪辑区域与指定 RectangleF 结构的交集。
公共方法 IntersectClip(Region) 将此 Graphics 对象的剪辑区域更新为当前剪辑区域与指定 Region 的交集。
公共方法 IsVisible(Point) 指示指定的 Point 结构是否包含在此Graphics 的可见剪辑区域内。
公共方法 IsVisible(PointF) 指示指定的 PointF 结构是否包含在此Graphics 的可见剪辑区域内。
公共方法 IsVisible(Rectangle) 指示 Rectangle 结构指定的矩形是否包含在此 Graphics 的可见剪辑区域内。
公共方法 IsVisible(RectangleF) 指示 RectangleF 结构指定的矩形是否包含在此 Graphics 的可见剪辑区域内。
公共方法 IsVisible(Int32, Int32) 指示由一对坐标指定的点是否包含在此Graphics 的可见剪辑区域内。
公共方法 IsVisible(Single, Single) 指示由一对坐标指定的点是否包含在此Graphics 的可见剪辑区域内。
公共方法 IsVisible(Int32, Int32, Int32, Int32) 指示由一对坐标、一个宽度和一个高度指定的矩形是否包含在此 Graphics 的可见剪辑区域内。
公共方法 IsVisible(Single, Single, Single, Single) 指示由一对坐标、一个宽度和一个高度指定的矩形是否包含在此 Graphics 的可见剪辑区域内。
公共方法 MeasureCharacterRanges 获取 Region 对象的数组,其中每个对象将字符位置的范围限定在指定字符串内。
公共方法 MeasureString(String, Font) 测量用指定的 Font 绘制的指定字符串。
公共方法 MeasureString(String, Font, SizeF) 当在指定的布局区域内以指定的 Font 绘制时,测量指定的字符串。
公共方法 MeasureString(String, Font, Int32) 测量用指定的 Font 绘制的指定字符串。
公共方法 MeasureString(String, Font, PointF, StringFormat) 测量用指定的 Font 绘制并用指定的StringFormat 格式化的指定字符串。
公共方法 MeasureString(String, Font, SizeF, StringFormat) 测量用指定的 Font 绘制并用指定的StringFormat 格式化的指定字符串。
公共方法 MeasureString(String, Font, Int32, StringFormat) 测量用指定的 Font 绘制并用指定的StringFormat 格式化的指定字符串。
公共方法 MeasureString(String, Font, SizeF, StringFormat, Int32, Int32) 测量用指定的 Font 绘制并用指定的StringFormat 格式化的指定字符串。
公共方法 MultiplyTransform(Matrix) 将此 Graphics 的世界变换乘以指定的Matrix
公共方法 MultiplyTransform(Matrix, MatrixOrder) 以指定顺序将此 Graphics 的世界变换乘以指定的 Matrix
公共方法 ReleaseHdc() 释放通过以前对此 Graphics 的 GetHdc 方法的调用获得的设备上下文句柄。
公共方法 ReleaseHdc(IntPtr) 释放通过以前对此 Graphics 的 GetHdc 方法的调用获得的设备上下文句柄。
公共方法 ReleaseHdcInternal 基础结构。 释放设备上下文的句柄。
公共方法 ResetClip 将此 Graphics 的剪辑区域重置为无限区域。
公共方法 ResetTransform 将此 Graphics 的世界变换矩阵重置为单位矩阵。
公共方法 Restore 将此 Graphics 的状态还原到 GraphicsState表示的状态。
公共方法 RotateTransform(Single) 将指定旋转应用于此 Graphics 的变换矩阵。
公共方法 RotateTransform(Single, MatrixOrder) 以指定顺序将指定旋转应用到此 Graphics 的变换矩阵。
公共方法 Save 保存此 Graphics 的当前状态,并用GraphicsState 标识保存的状态。
公共方法 ScaleTransform(Single, Single) 将指定的缩放操作应用于此 Graphics 的变换矩阵,方法是将该对象的变换矩阵左乘该缩放矩阵。
公共方法 ScaleTransform(Single, Single, MatrixOrder) 以指定顺序将指定的缩放操作应用到此Graphics 的变换矩阵。
公共方法 SetClip(Graphics) 将此 Graphics 的剪辑区域设置为指定Graphics 的 Clip 属性。
公共方法 SetClip(GraphicsPath) 将此 Graphics 的剪辑区域设置为指定的GraphicsPath
公共方法 SetClip(Rectangle) 将此 Graphics 的剪辑区域设置为 Rectangle结构指定的矩形。
公共方法 SetClip(RectangleF) 将此 Graphics 的剪辑区域设置为RectangleF 结构指定的矩形。
公共方法 SetClip(Graphics, CombineMode) 将此 Graphics 的剪辑区域设置为当前剪辑区域和指定的 Graphics 的 Clip 属性指定的组合操作的结果。
公共方法 SetClip(GraphicsPath, CombineMode) 将此 Graphics 的剪辑区域设置为当前剪辑区域与指定 GraphicsPath 的组合结果。
公共方法 SetClip(Rectangle, CombineMode) 将此 Graphics 的剪辑区域设置为当前剪辑区域与 Rectangle 结构所指定矩形的组合结果。
公共方法 SetClip(RectangleF, CombineMode) 将此 Graphics 的剪辑区域设置为当前剪辑区域与 RectangleF 结构所指定矩形的组合结果。
公共方法 SetClip(Region, CombineMode) 将此 Graphics 的剪辑区域设置为当前剪辑区域与指定 Region 的组合结果。
公共方法 ToString 返回表示当前对象的字符串。 (继承自Object。)
公共方法 TransformPoints(CoordinateSpace, CoordinateSpace, Point[]) 使用此 Graphics 的当前世界变换和页变换,将点数组从一个坐标空间转换到另一个坐标空间。
公共方法 TransformPoints(CoordinateSpace, CoordinateSpace, PointF[]) 使用此 Graphics 的当前世界变换和页变换,将点数组从一个坐标空间转换到另一个坐标空间。
公共方法 TranslateClip(Int32, Int32) 将此 Graphics 的剪辑区域沿水平方向和垂直方向平移指定的量。
公共方法 TranslateClip(Single, Single) 将此 Graphics 的剪辑区域沿水平方向和垂直方向平移指定的量。
公共方法 TranslateTransform(Single, Single) 通过使此 Graphics 的变换矩阵左乘指定的平移来更改坐标系统的原点。
公共方法 TranslateTransform(Single, Single, MatrixOrder) 通过以指定顺序将指定平移应用于此Graphics 的变换矩阵来更改坐标系统的原点。
---------graphics类实例
private void DrawImagePointF(PaintEventArgs e)
{

    // 实例化一个IMAGE对象
    Image newImage = Image.FromFile("SampImag.jpg");

    // 在左上角创建一个点
    PointF ulCorner = new PointF(100.0F, 100.0F);

    // 在屏幕上画一张图
    e.Graphics.DrawImage(newImage, ulCorner);
}

     参考   msdn

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值