]> git.sur5r.net Git - cc65/blobdiff - doc/tgi.sgml
Adjusted URL to use https (and removed obsolete dates).
[cc65] / doc / tgi.sgml
index d9253cf09820fae44e7f02b7b24f0ffa9f40ce78..c5878622e31e5216725597baa27d0f76756176cd 100644 (file)
@@ -2,19 +2,20 @@
 
 <article>
 <title>Tiny Graphics Interface
-<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
-<date>2017-11-23
+<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
+<url url="mailto:polluks@sdf.lonestar.org" name="Stefan A. Haubenthal">,<newline>
+<url url="mailto:greg.king5@verizon.net" name="Greg King">
 
 <abstract>
 The cc65 library provides functions for platform independent graphics.
-Include the tgi.h header file to get the necessary definitions.
+Include the tgi.h header file to get the necessary definitions, see also
+<tt>samples/tgidemo.c</tt> and <tt>samples/mandelbrot.c</tt>.
 </abstract>
 
-<!-- Table of contents -->
-<toc>
-
 <!-- Begin the document -->
 
+<sect>tgi.h<label id="tgi.h">
+
 <sect1>tgi_arc<label id="tgi_arc"><p>
 
 <quote>
@@ -402,6 +403,46 @@ be used in presence of a prototype.
 </quote>
 
 
+<sect1>tgi_gettextheight<label id="tgi_gettextheight"><p>
+
+<quote>
+<descrip>
+<tag/Function/Calculate the height of the text in pixels according to
+the current text style.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ tgi_gettextheight (const char* s);/
+<tag/Description/Calculate the height of the text in pixels according to
+the current text style.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/Other tgi functions.
+<tag/Example/None.
+</descrip>
+</quote>
+
+
+<sect1>tgi_gettextwidth<label id="tgi_gettextwidth"><p>
+
+<quote>
+<descrip>
+<tag/Function/Calculate the width of the text in pixels according to the current text style.
+<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
+<tag/Declaration/<tt/unsigned __fastcall__ tgi_gettextwidth (const char* s);/
+<tag/Description/Calculate the width of the text in pixels according to the current text style.
+<tag/Notes/<itemize>
+<item>The function is only available as fastcall function, so it may only
+be used in presence of a prototype.
+</itemize>
+<tag/Availability/cc65
+<tag/See also/Other tgi functions.
+<tag/Example/None.
+</descrip>
+</quote>
+
+
 <sect1>tgi_getxres<label id="tgi_getxres"><p>
 
 <quote>
@@ -782,6 +823,7 @@ tgi_bar(10,10,20,20);
 </descrip>
 </quote>
 
+
 <sect1>tgi_setdrawpage<label id="tgi_setdrawpage"><p>
 
 <quote>
@@ -811,6 +853,7 @@ tgi_setviewpage(0); // Show page 0
 </descrip>
 </quote>
 
+
 <sect1>tgi_setpalette<label id="tgi_setpalette"><p>
 
 <quote>
@@ -831,6 +874,7 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_setpixel<label id="tgi_setpixel"><p>
 
 <quote>
@@ -849,54 +893,6 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
-<sect1>tgi_setviewpage<label id="tgi_setviewpage"><p>
-
-<quote>
-<descrip>
-<tag/Function/Set page to be visible on screen.
-<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/void __fastcall__ tgi_setviewpage (unsigned char page);/
-<tag/Description/If the drawpage and the viewpage are the same then all drawing
-is seen immediately as it is drawn. For double buffered games you can set the
-drawpage to a different page than the viewpage. This lets you draw the next
-screen in the background and when the screen is ready you display it.
-<tag/Notes/<itemize>
-<item>The function is only available as fastcall function, so it may only
-be used in presence of a prototype.
-</itemize>
-<tag/Availability/cc65
-<tag/See also/Other tgi functions.
-<tag/Example/<verb>
-tgi_setdrawpage(1);
-tgi_outtextxy(10, 10, "Hello World");
-tgi_setviewpage(1); // Show page 1
-tgi_setdrawpage(0);
-tgi_outtextxy(10, 10, "Creating next frame");
-...
-tgi_setviewpage(0); // Show page 0
-</verb>
-</descrip>
-</quote>
-
-<sect1>tgi_gettextheight<label id="tgi_gettextheight"><p>
-
-<quote>
-<descrip>
-<tag/Function/Calculate the height of the text in pixels according to
-the current text style.
-<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_gettextheight (const char* s);/
-<tag/Description/Calculate the height of the text in pixels according to
-the current text style.
-<tag/Notes/<itemize>
-<item>The function is only available as fastcall function, so it may only
-be used in presence of a prototype.
-</itemize>
-<tag/Availability/cc65
-<tag/See also/Other tgi functions.
-<tag/Example/None.
-</descrip>
-</quote>
 
 <sect1>tgi_settextscale<label id="tgi_settextscale"><p>
 
@@ -919,6 +915,7 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
+
 <sect1>tgi_settextstyle<label id="tgi_settextstyle"><p>
 
 <quote>
@@ -938,24 +935,37 @@ be used in presence of a prototype.
 </descrip>
 </quote>
 
-<sect1>tgi_gettextwidth<label id="tgi_gettextwidth"><p>
+
+<sect1>tgi_setviewpage<label id="tgi_setviewpage"><p>
 
 <quote>
 <descrip>
-<tag/Function/Calculate the width of the text in pixels according to the current text style.
+<tag/Function/Set page to be visible on screen.
 <tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_gettextwidth (const char* s);/
-<tag/Description/Calculate the width of the text in pixels according to the current text style.
+<tag/Declaration/<tt/void __fastcall__ tgi_setviewpage (unsigned char page);/
+<tag/Description/If the drawpage and the viewpage are the same then all drawing
+is seen immediately as it is drawn. For double buffered games you can set the
+drawpage to a different page than the viewpage. This lets you draw the next
+screen in the background and when the screen is ready you display it.
 <tag/Notes/<itemize>
 <item>The function is only available as fastcall function, so it may only
 be used in presence of a prototype.
 </itemize>
 <tag/Availability/cc65
 <tag/See also/Other tgi functions.
-<tag/Example/None.
+<tag/Example/<verb>
+tgi_setdrawpage(1);
+tgi_outtextxy(10, 10, "Hello World");
+tgi_setviewpage(1); // Show page 1
+tgi_setdrawpage(0);
+tgi_outtextxy(10, 10, "Creating next frame");
+...
+tgi_setviewpage(0); // Show page 0
+</verb>
 </descrip>
 </quote>
 
+
 <sect1>tgi_uninstall<label id="tgi_uninstall"><p>
 
 <quote>
@@ -972,6 +982,7 @@ Will call tgi_done if necessary.
 </descrip>
 </quote>
 
+
 <sect1>tgi_unload<label id="tgi_unload"><p>
 
 <quote>