ActivityDesignerPaint.DrawImage 方法

定義

在活動設計器表面繪製圖像。

多載

名稱 Description
DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment)

在活動設計器表面Graphics上透過 、 ImageRectangleDesignerContentAlignment和 a 繪製圖像。

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

透過 、 、Graphics來源與目的地 ImageRectangle、單精度浮點數及布林值,在活動設計器表面DesignerContentAlignment繪製影像。

DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment)

在活動設計器表面Graphics上透過 、 ImageRectangleDesignerContentAlignment和 a 繪製圖像。

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 包含一個空參考(Nothing,Visual Basic中)。

備註

當你使用這個版本 DrawImage時,來源矩形會設定為圖片的像素大小,透明度設定為 1.0f,且不允許繪製灰階。

適用於

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

透過 、 、Graphics來源與目的地 ImageRectangle、單精度浮點數及布林值,在活動設計器表面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)

參數

graphics
Graphics

用來繪製圖像的對象 Graphics

image
Image

Image 畫。

destination
Rectangle

Rectangle 個定義了影像的邊界。

source
Rectangle

Rectangle 個定義了影像的來源。

alignment
DesignerContentAlignment

DesignerContentAlignment 個 就是指定影像在邊界矩形中如何對齊。

transparency
Single

一個單精度浮點數,用來定義影像的透明度設定。

grayscale
Boolean

true以灰階繪製影像;否則,。 false

例外狀況

graphicsimagedestinationsource 包含一個空參考(Visual Basic 中的 Nothing)。

-或-

transparency 小於0,或大於1.0華氏度。

適用於