<html><head><title>[xgap] 6.5 Global Information</title></head> <body text="#000000" bgcolor="#ffffff"> [<a href = "C006S000.htm">Up</a>] [<a href ="C006S004.htm">Previous</a>] [<a href ="C007S000.htm">Next</a>] [<a href = "theindex.htm">Index</a>] <h1>6.5 Global Information</h1><p> <p> There are some global data structures which can and should be consulted if certain information is needed. The first (about color handling) was already described in section <a href="C006S003.htm">Color Models</a>. The second is for vertices: <p> <a name = "SSEC1"></a> <li><code>VERTEX V</code> <p> This globally bound record contains the following components: <p> <p> <dl compact> <dt><code>circle</code> <dd> integer value for the vertex type ``circle'' <p> <dt><code>diamond</code> <dd> integer value for the vertex type ``diamond'' <p> <dt><code>rectangle</code> <dd> integer value for the vertex type ``rectangle'' <p> <dt><code>radius</code> <dd> radius in pixels of a vertex on the screen <p> <dt><code>diameter</code> <dd> diameter in pixels of a vertex on the screen </dl> <p> The third structure is about the available fonts. <p> <a name = "SSEC2"></a> <li><code>FONTS V</code> <p> This globally bound record has the following components: <code>tiny</code>, <code>small</code>, <code>normal</code>, <code>large</code>, <code>huge</code> and <code>fonts</code>. The first 5 are itself records each for one available font. They have components <code>name</code> for the name of the font and <code>fontInfo</code>, which is a list of 3 integers. The first is the maximal size of a character above the baseline in pixels, the second is the maximal size of a character below the baseline in pixels, and the third is the width in pixels of <strong>all</strong> characters, because it is always assumed, that the fonts are non-proportional. <p> <a name = "SSEC3"></a> <li><code>FontInfo( </code><var>font</var><code> ) O</code> <p> Returns the information about the font <var>font</var>. The result is a triple of integers. The first number is the maximal size of a character above the baseline in pixels, the second is the maximal size of a character below the baseline in pixels, and the third is the width in pixels of <strong>all</strong> characters, because it is always assumed, that the fonts are non-proportional. Use this function rather than accessing the component <code>fontInfo</code> of a font object directly! <p> There is another global structure: <p> <a name = "SSEC4"></a> <li><code>BUTTONS V</code> <p> This record contains the following components: <code>left</code> and <code>right</code> contain a number for the left resp. right mouse button. <code>shift</code> and <code>ctrl</code> contain codes for the respective keys on the keyboard. <p> You should always use these global data instead of hardwiring any integers into your code. <p> [<a href = "C006S000.htm">Up</a>] [<a href ="C006S004.htm">Previous</a>] [<a href ="C007S000.htm">Next</a>] [<a href = "theindex.htm">Index</a>] <P> <address>xgap manual<br>Mai 2003 </address></body></html>