MgraText()函数

Synopsis

Write text.

Format

void MgraText(GraphContId, DestImageBufId, XStart, YStart, String)

MIL_ID GraphContId; Graphics context identifier
MIL_ID DestImageBufId; Destination image buffer identifier
long XStart; X-coordinate of writing position
long YStart; Y-coordinate of writing position
char *String; Null terminated ASCII string

Description

This function writes the specified ASCII string to the specified buffer starting at the specified writing position, using the parameters (colors, font, and size) defined in the graphics context. Use MgraFont and MgraFontScale to modify the font and size. Use MgraControl to obtain a transparent background for printed characters.

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 write. This parameter must be given a valid image buffer identifier.

The XStart and YStart parameters specify the coordinates of the position at which to start writing the top-left corner of the first character. The given coordinates are relative to the top-left corner of the buffer. They should be valid in the specified buffer; otherwise, the text is clipped.

The StringPtr parameter specifies the address of the string that must be written in the destination buffer. There is no restriction on the length of the string, except that the string must be null () terminated.

See also

MgraFont, MgraFontScale, MgraControl

《MgraText()函数》上有35条评论

评论已关闭。