OutChar Function

Microchip Graphics Library

Microchip Graphics Library
OutChar Function
C
WORD OutChar(
    XCHAR ch
);
Overview

This function outputs a character from the current graphic cursor position. OutChar() uses the current active font set with SetFont().

Input Parameters
Input Parameters 
Description 
XCHAR ch 
The character code to be displayed. 
Returns

For NON-Blocking configuration:

  • Returns 0 when device is busy and the character is not yet completely drawn.
  • Returns 1 when the character is completely drawn.
For Blocking configuration:
  • Always return 1.

Preconditions

none

Side Effects

After the function is completed, the graphic cursor position is moved in the horizontal direction by the character width. Vertical position of the graphic cursor is not changed.

Example
static WORD counter = 0;
XCHAR   ch;

// render characters until null character
while((XCHAR)(ch = *(textString + counter)) != 0)
{
    if(OutChar(ch) == 0)
        return (0);
    counter++;
}
Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved