ActivityDesignerPaint.DrawImage 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在活動設計器表面繪製圖像。
多載
| 名稱 | Description |
|---|---|
| DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment) |
在活動設計器表面Graphics上透過 、 ImageRectangleDesignerContentAlignment和 a 繪製圖像。 |
| DrawImage(Graphics, Image, Rectangle, Rectangle, DesignerContentAlignment, Single, Boolean) |
透過 、 、Graphics來源與目的地 Image、 Rectangle、單精度浮點數及布林值,在活動設計器表面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)
參數
- alignment
- DesignerContentAlignment
那 DesignerContentAlignment 個 就是指定影像在邊界矩形中如何對齊。
例外狀況
graphics、image 或 destination 包含一個空參考(Nothing,Visual Basic中)。
備註
當你使用這個版本 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 包含一個空參考(Visual Basic 中的 Nothing)。
-或-
transparency 小於0,或大於1.0華氏度。