
[Description]
Gets character codes, displayed on the screen, with their attribute.
This function is used with the function "crt_puttextimg" to backup or
restore the text image on the screen.
y1,x1 is top,left, y2,x2 is bottom,right position of the area from
where characters are got as follows. (The top of left side shows
raw-1, and column-1.)
+-----------------------------------+
│(1,1) Full screen │
│ │
│ +-------------------+ │
│ │(y1,x1) │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ (y2,x2)│ │
│ +-------------------+ │
│ Area for getting character │
│ │
│ │
│ (ymax,xmax)│
+-----------------------------------+
ymax=30, xmax=80
All character codes and their attributes, included the rectangular
area that is enclosed by (y1,x1)-(y2,x2),can be got.
(The characters which are enclosed in above area)*4 bytes area must
be reserved as "BUF". The data form, stored in "BUF", is as follows.
Upper word Lower word
+-----------------+-------------------+
│ Attribute │ Character code │
+-----------------+-------------------+
The character code is FANUC character code, and the type of the
attribute is explained the same as that of "crt_settextattr". The
position on the memory is corresponding to the position on the screen
as follows.
Position on the memory Position on the screen
-------------------------------+---------------------------
buf+0 y1 , x1 (Top,left)
buf+1 y1 , x1+1
: :
buf+(x2-x1) y1 , x2
buf+(x2-x1)+1 y1+1 , x1
: :
buf+(x2-x1+1)*(y2-y1+1)-1 y2 , x2 (Bottom,right)