ActivityDesignerPaint.DrawImage 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在活动设计器图面上绘制图像。
重载
| 名称 | 说明 |
|---|---|
| DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment) |
使用 、 Graphicsa Image、a Rectangle和 a DesignerContentAlignment在活动设计器图面上绘制图像。 |
| DrawImage(Graphics, Image, Rectangle, Rectangle, DesignerContentAlignment, Single, Boolean) |
使用、 Graphics源 Image和目标 Rectangle、 DesignerContentAlignment单精度浮点数和布尔值在活动设计器图面上绘制图像。 |
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)
参数
- alignment
- DesignerContentAlignment
指定 DesignerContentAlignment 图像在边界矩形中的对齐方式。
例外
graphics、image 或 destination 包含 null 引用(Visual Basic中的 Nothing)。
注解
使用此版本的 DrawImage源矩形时,源矩形设置为图像的大小(以像素为单位),透明度设置设置为 1.0f,不允许绘制灰度。
适用于
DrawImage(Graphics, Image, Rectangle, Rectangle, DesignerContentAlignment, Single, Boolean)
使用、 Graphics源 Image和目标 Rectangle、 DesignerContentAlignment单精度浮点数和布尔值在活动设计器图面上绘制图像。
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)
参数
- alignment
- DesignerContentAlignment
指定 DesignerContentAlignment 图像在边界矩形中的对齐方式。
- transparency
- Single
一个单精度浮点数,用于定义图像的透明度设置。
- grayscale
- Boolean
true 以灰度绘制图像;否则,为 false.
例外
graphics、image、destination 或 source 包含 null 引用(Visual Basic中的 Nothing)。
-或-
transparency 小于 0 或大于 1.0f。