Amos Professional Manual  Contents  Index

Interface Language


One side effect of the PrintOutline command is that the drawing mode is automatically re-set to transparent, and so a previous opaque setting may need to be changed. This is explained next.

SetWriting
Interface instruction: set the writing mode for text and graphics
SW mode;

Normally, all text and graphics are drawn over a transparent background, allowing them to merge neatly into the existing display. If you need to set the background colour using an INk command, you must change the mode to "opaque". The mode parameter that affects this command uses a value from zero to 7, and is fully explained under the GR WRITING command in Chapter 6.4. A parameter value of zero will set an opaque mode, and a value of 1 re-sets it to transparent. Use of the PrintOutline command automatically re-sets the mode to transparent.

SetFont
Interface instruction: select font to be assigned to text
SF number,style;

To change the type font used by a previous PRint or PrintOutline command, use SetFont followed by the number of the new font to be assigned to the text, and the style to be adopted by that font. A full explanation of the available styles can be found under the SET TEXT command in Chapter 5.6.

If only the style is to be changed, the font remains unaffected when a dummy parameter value, such as zero, is used for the font number.

There are four more simple Interface functions that can be used to manipulate text, which are self explanatory.

TextWidth
Interface function: return the width of current font text in pixels
width="text" TW

TextHeight
Interface function: return the height of current font in pixels
height=TH

TextLength
Interface function: return the number of characters in a string of text
number="text" TL

CentreX
Interface function: centre text in the display
position="text" CX

The CentreX function is used to find the correct centring location by comparing the width of the given text with the value returned by an SX function, like this:

SetVar 0,"Hello, this is the text"
PRint 0VA CentreX,0,0 VA,2;
Back    Next
09.02.05