 |
WinChar |
Function (ROM Call 0xA) |
Draws a character to a window.
DrawChar writes a character c at the current (x, y) location of the window
pointed to by w, using the current window attribute (set using WinAttr).
The character will be clipped at the boundaries of the window clipping area. The following
character attributes are supported (the region defined by a character is 8x10
for huge font, 6x8 for large font or nx5 for small font, depending on the
current font set by WinFont command):
A_NORMAL | The character is ORed into the destination |
A_REVERSE | The region created by inversing the character replaces the destination |
A_REPLACE | The region defined by the character replaces the destination |
A_XOR | The character is XORed into the destination |
A_SHADED | The character masked so that every other pixel is turned off then ORed into the destination |
See WinAttr command for a more general info about attributes.
Note: If the window is opened in TTY mode (see WinOpen), the current printing
location will be updated, and newline ('\n' or '\r') and formfeed ('\f') characters will be
handled correctly.
Note: On all AMS versions, WinChar calls most of the time a subroutine which is exported in the jump
table on AMS 2.xx as ROM_CALL_412. It doesn't call it if the window is opened in TTY mode and
the character is '\n', '\r' or '\f'. As a consequence, that subroutine is not of much use, as the
same effect (showing these characters as symbols) can be obtained by unsetting the WF_TTY flag. It
is mentioned here only for completeness.
Uses: WinClr, PortRestore, ScrRectScroll, sf_width, ROM Call 0x412, ROM Call 0x413
Used by: WinCharXY, WinStr, cmd_input, cmd_inputstr, cmd_prompt, TE_handleEvent, TE_open, TE_openFixed, TE_pasteText, TE_select