Skip to content

IGR_Canvas_DrawScaleImage

Renders the image specified by the ImageData parameter on the canvas at the given location given by the X and Y coordinates, scaling the output to width and height.

Prototype

IGR_LONG IGR_Canvas_DrawScaleImage(
    HCANVAS canvas,
    IGR_LONG x,
    IGR_LONG y,
    IGR_LONG width,
    IGR_LONG height,
    void* imagedata,
    size_t imagesize,
    const IGR_UCS2* mimetype,
    Error_Control_Block* error);

Parameters

Canvas: HCANVAS

Handle to a canvas, opened by a call to IGR_Make_Output_Canvas.

X: IGR_LONG

The X coordinate where the image is to be drawn.

Y: IGR_LONG

The Y coordinate where the image is to be drawn.

Width: IGR_LONG

The width that the image should be drawn.

Height: IGR_LONG

The height that the image should be drawn.

ImageData: Pointer to Bytes

Pointer to the image data loaded into memory.

ImageSize: IGR_LONG

The size of the buffer pointed to by ImageData.

MimeType: Pointer to Unicode String

A Unicode string indicating the MIME type of ImageData. Accepted values are:

    image/jpg or image/jpeg

    image/bmp

    image/png

Error: Pointer to Error_Control_Block

Returns error details if the call fails.

Return value

Success: IGR_LONG

Returns IGR_OK.

Failure: IGR_LONG

Returns one of the possible IGR_E error codes.

Additional information

Note The drawing API is available for bitmap and PDF outputs only. Drawing onto an HTML5 output is not supported.