ActivityDesignerPaint.DrawImage 方法

定义

在活动设计器图面上绘制图像。

重载

名称 说明
DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment)

使用 、 Graphicsa Image、a Rectangle和 a DesignerContentAlignment在活动设计器图面上绘制图像。

DrawImage(Graphics, Image, Rectangle, Rectangle, DesignerContentAlignment, Single, Boolean)

使用、 GraphicsImage和目标 RectangleDesignerContentAlignment单精度浮点数和布尔值在活动设计器图面上绘制图像。

DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment)

使用 、 Graphicsa Image、a Rectangle和 a DesignerContentAlignment在活动设计器图面上绘制图像。

public:
 static void DrawImage(System::Drawing::Graphics ^ graphics, System::Drawing::Image ^ image, System::Drawing::Rectangle destination, System::Workflow::ComponentModel::Design::DesignerContentAlignment alignment);
public static void DrawImage(System.Drawing.Graphics graphics, System.Drawing.Image image, System.Drawing.Rectangle destination, System.Workflow.ComponentModel.Design.DesignerContentAlignment alignment);
static member DrawImage : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * System.Workflow.ComponentModel.Design.DesignerContentAlignment -> unit
Public Shared Sub DrawImage (graphics As Graphics, image As Image, destination As Rectangle, alignment As DesignerContentAlignment)

参数

graphics
Graphics

Graphics要绘制图像的依据。

image
Image

Image 绘制的。

destination
Rectangle

定义 Rectangle 要绘制的图像边界的边界。

alignment
DesignerContentAlignment

指定 DesignerContentAlignment 图像在边界矩形中的对齐方式。

例外

graphicsimagedestination 包含 null 引用(Visual Basic中的 Nothing)。

注解

使用此版本的 DrawImage源矩形时,源矩形设置为图像的大小(以像素为单位),透明度设置设置为 1.0f,不允许绘制灰度。

适用于

DrawImage(Graphics, Image, Rectangle, Rectangle, DesignerContentAlignment, Single, Boolean)

使用、 GraphicsImage和目标 RectangleDesignerContentAlignment单精度浮点数和布尔值在活动设计器图面上绘制图像。

public:
 static void DrawImage(System::Drawing::Graphics ^ graphics, System::Drawing::Image ^ image, System::Drawing::Rectangle destination, System::Drawing::Rectangle source, System::Workflow::ComponentModel::Design::DesignerContentAlignment alignment, float transparency, bool grayscale);
public static void DrawImage(System.Drawing.Graphics graphics, System.Drawing.Image image, System.Drawing.Rectangle destination, System.Drawing.Rectangle source, System.Workflow.ComponentModel.Design.DesignerContentAlignment alignment, float transparency, bool grayscale);
static member DrawImage : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.Rectangle * System.Workflow.ComponentModel.Design.DesignerContentAlignment * single * bool -> unit
Public Shared Sub DrawImage (graphics As Graphics, image As Image, destination As Rectangle, source As Rectangle, alignment As DesignerContentAlignment, transparency As Single, grayscale As Boolean)

参数

graphics
Graphics

Graphics要绘制图像的依据。

image
Image

Image 绘制的。

destination
Rectangle

Rectangle定义图像边界的边界。

source
Rectangle

Rectangle定义图像的源。

alignment
DesignerContentAlignment

指定 DesignerContentAlignment 图像在边界矩形中的对齐方式。

transparency
Single

一个单精度浮点数,用于定义图像的透明度设置。

grayscale
Boolean

true 以灰度绘制图像;否则,为 false.

例外

graphicsimagedestinationsource 包含 null 引用(Visual Basic中的 Nothing)。

-或-

transparency 小于 0 或大于 1.0f。

适用于