Skip to content

IGR_Canvas_LineTo

Draws a line on the canvas from the current pen position to the point specified by X and Y, and sets the pen position to (X, Y).

Prototype

IGR_LONG IGR_Canvas_LineTo(
    HCANVAS canvas,
    IGR_LONG x,
    IGR_LONG y,
    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 of the end point.

Y: IGR_LONG

The Y coordinate of the end point.

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

Use IGR_Canvas_LineTo to draw a line from the current pen position to the new coordinates. The pen position will be updated to the new coordinates.

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

See also