DQBprint
SUB

Prototype

DECLARE SUB DQBprint (Layer AS INTEGER, Text AS STRING, x AS INTEGER,
                      y AS INTEGER, Col AS INTEGER)

Parameters

Layer - Layer where to draw the text

Text - String to print

x - X position of upper left corner of the first character

y - Y position of upper left corner of the first character

Col - Text color

Returns

none

Description

This function will print the specified string onto the given layer. By default, the VGA BIOS font is used, but any font can be used by first calling DQBsetFont. Also, the last style selected by DQBsetTextStyle is used. The x and y parameters are in pixel units, so you can print the text anywhere on specified layer. If you specify a x value of &H8000 (or you type in the constant CENTERED - see appendix A) the text is automatically centered on the current viewport set by the last call to DQBsetClipBox (that's by default the entire screen)

Notes:

DQBprint supports clipping, so pixels outside the clipping box will not be drawn. See also DQBprints, DQBsetTextStyle, DQBsetFont and DQBsetBIOSfont.

Example

*****************************************************************************

' All integers for speed
DEFINT A-Z

'$INCLUDE:'DIRECTQB.BI'

' Let's initialize the library with no extra layers nor sounds nor EMS
IF DQBinit(0, 0, 0) THEN DQBclose: PRINT DQBerror$: END

DQBinitVGA

' Prints text on the center of the screen in bright red
DQBprint VIDEO, "This is a DQBprint test!", CENTERED, 96, 40

' Waits for the user to press a key
WHILE INKEY$ = "": WEND

' Ends program
DQBclose

*****************************************************************************