Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 992 -
2. Character function
------------------------------------------------------------------------------
2.1 Get character in the specified area. <Main>
------------------------------------------------------------------------------
[Name]
mmc_gettext
[Syntax]
#include <fgraph.h>
short mmc_gettext( short x1, short y1, short x2, short y2,
_MCHRBUF *chr_buf ) ;
[Arguments]
x1,y1,x2,y2 Screen area (left-upper, right-lower)
chr_buf Buffer memory in where data are stored.
[Return]
0 Successful.
-1 Warning. (Out of screen)
2 Error. (No work memory)
[Description]
Reads characters in the specified screen area to the memory.
Specify screen area to read as left-upper point of screen (Home
position) is (1,1). The first character is read at the start point
(left-upper position), and continuously reads rightward, jumps to the
next line at the right end, the last character is read at the right-
lower position. The required byte size to read is calculated by
"mmc_textsize()" function. Character code and attribute are stored
by internal format. The structure of output buffer is as follows.
+----------------------------+
0 | Column size |
-----------------------------+
2 | Line size |
+----------------------------+
4 | 1st character - code | --+
+----------------------------+ +--- data for one character
6 | 1st character - attribute | --+
+----------------------------+
:
+----------------------------+
m | n-th character - code |
+----------------------------+
m+2 | n-th character - attribute |
+----------------------------+
If the specified area overruns the screen like below, SPACE character
and WHITE attribute is stored in the overruned region and "Warning"
is returned as result.