編集

次の方法で共有


ActivityDesignerPaint.DrawImage Method

Definition

Draws an image on the activity designer surface.

Overloads

DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment)

Draws an image on the activity designer surface by using a Graphics, an Image, a Rectangle, and a DesignerContentAlignment.

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

Draws an image on the activity designer surface by using a Graphics, an Image, a source and destination Rectangle, an DesignerContentAlignment, a single-precision floating-point number, and a Boolean value.

DrawImage(Graphics, Image, Rectangle, DesignerContentAlignment)

Draws an image on the activity designer surface by using a Graphics, an Image, a Rectangle, and 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)

Parameters

graphics
Graphics

The Graphics on which to draw the image.

image
Image

The Image to draw.

destination
Rectangle

The Rectangle that defines the bounds of the image to draw.

alignment
DesignerContentAlignment

The DesignerContentAlignment that specifies how the image is aligned in the bounding rectangle.

Exceptions

graphics, image, or destination contains a null reference (Nothing in Visual Basic).

Remarks

When you use this version of DrawImage, the source rectangle is set to the size, in pixels, of the image, the transparency setting is set to 1.0f, and drawing grayscales is not allowed.

Applies to

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

Draws an image on the activity designer surface by using a Graphics, an Image, a source and destination Rectangle, an DesignerContentAlignment, a single-precision floating-point number, and a Boolean value.

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)

Parameters

graphics
Graphics

The Graphics on which to draw the image.

image
Image

The Image to draw.

destination
Rectangle

The Rectangle that defines the bounds of the image.

source
Rectangle

The Rectangle that defines the source of the image.

alignment
DesignerContentAlignment

The DesignerContentAlignment that specifies how the image is aligned in the bounding rectangle.

transparency
Single

A single-precision floating-point number that defines the transparency settings for the image.

grayscale
Boolean

true to draw the image in grayscales; otherwise, false.

Exceptions

graphics, image, destination, or source contains a null reference (Nothing in Visual Basic).

-or-

transparency is less than 0, or greater than 1.0f.

Applies to