:orphan:

======================
TKE_Text_With_Encoding
======================

Opcode
======

.. csv-table::

	"ASCII", "x"
	"Hexadecimal", "78"
	"Decimal", "120"


Operands
========

| Point position, Byte encoding, Variable length, 
| (length)xByte string Byte options, 
| [Byte region_options,  Byte region_count,  (region_count)xPoint region]

.. raw:: html

	<table BORDER =1 WIDTH="530">
	  <TR> 
		<TD height=21 width=131>position</TD>
		<TD height=21 width=390>reference point of the text</TD>
	  </TR>
	  <TR> 
		<TD height=21 width=131>encoding</TD>
		<TD height=21 width=390>format of text data</TD>
	  </TR>
	  <TR> 
		<TD height=21 width=131>length</TD>
		<TD height=21 width=390>length of the string. Value is a <strong>Byte</strong>, 
		  but if the value is 254, the real length follows as an additional <strong>Short</strong>, 
		  or if 255 as an additional <strong>Long</strong>.</TD>
	  </TR>
	  <tr> 
		<td WIDTH="131" HEIGHT="21">string</td>
		<td WIDTH="390" HEIGHT="21">text string</td>
	  </tr>
	  <tr> 
		<td WIDTH="131" HEIGHT="21">options</td>
		<td WIDTH="390" HEIGHT="21">additional text options</td>
	  </tr>
	  <tr> 
		<td WIDTH="131" HEIGHT="21">region_options</td>
		<td WIDTH="390" HEIGHT="21">text region options</td>
	  </tr>
	  <tr> 
		<td WIDTH="131" HEIGHT="21">region_count</td>
		<td WIDTH="390" HEIGHT="21">number of points defining the text region</td>
	  </tr>
	  <tr> 
		<td WIDTH="131" HEIGHT="21">region</td>
		<td WIDTH="390" HEIGHT="21">points defining the text region</td>
	  </tr>
	</table>


Notes
=====

Text string is inserted into the currently open segment. The interpretation of the ``string`` data is dependent on the specified *encoding*.


Encodings
---------

.. raw:: html

	<table BORDER =1 WIDTH="500">
	  <TR> 
		<TD height=21 width=50> 0</TD>
		<TD height=21 width=390>ISO Latin One (ISO-8859-1, 8-bit values)</TD>
	  </TR>
	  <tr> 
		<td WIDTH=50 HEIGHT=21> 1</td>
		<td WIDTH=390 HEIGHT=21>ISO Latin (ISO-8859, mixed 8 & 16-bit values)</td>
	  </tr>
	  <tr> 
		<td WIDTH=50 HEIGHT=21> 2</td>
		<td WIDTH=390 HEIGHT=21>JEC (Shift-JIS, based on JIS-208, mixed 8 & 16-bit 
		  values)</td>
	  </tr>
	  <tr> 
		<td WIDTH=50 HEIGHT=21> 3</td>
		<td WIDTH=390 HEIGHT=21>EUC (Extended Unix Code, mixed 8 & 16-bit values)</td>
	  </tr>
	  <tr> 
		<td WIDTH=50 HEIGHT=21> 2</td>
		<td WIDTH=390 HEIGHT=21>Raw 16-bit values (direct 16-bit font indices)</td>
	  </tr>
	  <tr> 
		<td WIDTH=50 HEIGHT=21> 3</td>
		<td WIDTH=390 HEIGHT=21>Unicode (16-bit proper subset of ISO-10646)</td>
	  </tr>
	</table>


Options
-------

.. csv-table::

	"0x01", "Text Region, ``region_options``, ``region_count``, ``region`` present if ``on``"


Region options
--------------

.. csv-table::

	"0x01", "World Space, coordinates are points in modelling coordinates, rather than window coordinates, if *on*"
	"0x02", "Relative coordinates, region is specified relative to the text insertion point, rather than absolute coordinates, if *on*"

Version 6.00 and before only supported a simple **Byte** *length*.

Options and Text Region added in 10.02.
