# Function Reference

# _GDIPlus_DrawImagePoints

Draws an image at a specified location

#include <GDIPlus.au3>
_GDIPlus_DrawImagePoints ( $hGraphic, $hImage, $nULX, $nULY, $nURX, $nURY, $nLLX, $nLLY [, $iCount = 3] )

## Parameters

$hGraphic | Handle to a Graphics object
$hImage | Handle to an Image object
$nULX | The X coordinate of the upper left corner of the source image
$nULY | The Y coordinate of the upper left corner of the source image
$nURX | The X coordinate of the upper right corner of the source image
$nURY | The Y coordinate of the upper right corner of the source image
$nLLX | The X coordinate of the lower left corner of the source image
$nLLY | The Y coordinate of the lower left corner of the source image
$iCount | [optional] Specifies the number of points (x,y)'s in the structure.

## Return Value

Success: | True
Failure: | False and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GDIP_ERR* see GPIPlusConstants.au3).

## Remarks

The value of the count parameter must equal 3 to specify the coordinates of the upper-left corner, upper-right corner, and lower-left corner of the parallelogram.
The coordinate of the lower-right corner, the width, and the height of the image, are calculated using the three given coordinates.
The image is scaled to fit the parallelogram.

## See Also

Search GdipDrawImagePoints in MSDN Library.

## Example

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <WinAPIHObj.au3>

    Example()

    Func Example()
        Local $hBitmap1, $hBitmap2, $hImage1, $hImage2, $hGraphic

        ; Initialize GDI+ library
        _GDIPlus_Startup()

        ; Capture full screen
        $hBitmap1 = _ScreenCapture_Capture("")
        $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap1)

        ; Capture screen region
        $hBitmap2 = _ScreenCapture_Capture("", 0, 0, 400, 300)
        $hImage2 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap2)

        ; Draw one image in another
        $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage1)

        _GDIPlus_DrawImagePoints($hGraphic, $hImage2, 100, 100, 600, 170, 130, 570)

        ; Draw a frame around the inserted image
        _GDIPlus_GraphicsDrawRect($hGraphic, 100, 100, 400, 300)

        ; Save resultant image
        _GDIPlus_ImageSaveToFile($hImage1, @MyDocumentsDir & "\GDIPlus_Image.jpg")

        ; Clean up resources
        _GDIPlus_ImageDispose($hImage1)
        _GDIPlus_ImageDispose($hImage2)
        _WinAPI_DeleteObject($hBitmap1)
        _WinAPI_DeleteObject($hBitmap2)

        ; Shut down GDI+ library
        _GDIPlus_Shutdown()

        ShellExecute(@MyDocumentsDir & "\GDIPlus_Image.jpg")
    EndFunc   ;==>Example