Graphics::DrawImage(Image*,constPointF&) method (gdiplusgraphics.h)
The Graphics::DrawImage method draws an image.
Syntax
Status DrawImage(
Image *image,
const PointF & point
);
Parameters
image
Pointer to an Image object that specifies the source image.
point
Reference to a PointF object that specifies the coordinates of the upper-left corner of the destination position at which to draw the image.
Return value
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Remarks
Examples
The following example draws an image. The image is drawn with the upper-left corner at the coordinate specified by the point parameter.
VOID Example_DrawImage8(HDC hdc)
{
Graphics graphics(hdc);
// Create an Image object.
Image image(L"climber.jpg");
// Draw the image.
graphics.DrawImage(&image, PointF(0.0f, 0.0f));
}
Requirements
Requirement | Value |
---|---|
Header | gdiplusgraphics.h |
See also
Drawing, Positioning, and Cloning Images