<chapter id="live-gfx">
<title>Live Graphics</title>

<indexterm>
<primary>Live Graphics</primary>
</indexterm>
<indexterm>
<primary>gogui-gfx</primary>
</indexterm>

<para>
The Go engine can display graphical data on the Go board while a command
is in progress by writing draw commands to the standard error stream.
Every line that starts with <userinput>gogui-gfx:</userinput> is interpreted
by GoGui as a draw command using the same syntax as in the
<userinput>gfx</userinput> Analyze command type.
The additional command CLEAR can be used for clearing all markup.
If no draw command follows immediately after
<userinput>gogui-gfx:</userinput>, all following lines until the next empty
line will be interpreted as draw commands.
See the <userinput>dummy_live_gfx</userinput> command in
<xref linkend="reference-gtpdummy"/> for an example.
</para>

<note>
<simpara>
Since the parsing of the standard error stream stops when the command response
is received, and Java does not allow to guarantee the correct order of
standard error and response stream, there is a small chance that a live
graphics command, which arrives shortly before the response, is handled during
the next GTP command. You can avoid this situation by explicitly writing a
<userinput>gogui-gfx: CLEAR</userinput> command to standard error before the
command ends.
</simpara>
</note>

<para><!-- Empty paragraph to enforce space in JEditorPane --></para>

</chapter>
