MgraLine()函数

Synopsis

Draw a line.

Format

void MgraLine(GraphcontId, DestImageBufId, XStart, YStart, XEnd, YEnd)

MIL_ID GraphContId; Graphics context identifier
MIL_ID DestImageBufId; Destination image buffer identifier
long XStart; X-coordinate of start of line position
long YStart; Y-coordinate of start of line position
long XEnd; X-coordinate of end of line position
long YEnd; Y-coordinate of end of line position

Description

This function draws a line starting and ending at the specified coordinates, using the foreground color specified in the graphics context.

The GraphContId parameter specifies the identifier of the graphics context. This parameter can be set to M_DEFAULT, in which case, the default graphics context of the current MIL application is used.

The DestImageBufId parameter specifies the identifier of the buffer in which to draw. This parameter must be given a valid image buffer identifier.

The XStart and YStart parameters specify the coordinates of one line extremity, while XEnd and YEnd specify the coordinates of the other. The given coordinates are relative to the top-left corner of the specified target buffer. They should be valid in the specified buffer; otherwise, the line is clipped outside the buffer boundaries.