DECLARE SUB DQBprints (Layer AS INTEGER, Text AS STRING, x AS INTEGER,
y AS INTEGER, Col AS INTEGER, Style AS INTEGER)
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
Style - Custom text style
none
DQBprints works exactly like DQBprint, but it requires an additional parameter that allows to specify the style of the output text. Specified style is applied only to one call of this function; once the text has been drawn, the original text style is restored. For the styles, see appendix A for a list of constants, and take a look at the DQBsetTextStyle function.
DQBprints supports clipping, so pixels outside the clipping box will not be drawn. See also DQBprint, DQBsetTextStyle, DQBsetFont and DQBsetBIOSfont.
*****************************************************************************
' 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
' Uses normal font with DQBprint
DQBprint VIDEO, "This is a normal text", 0, 0, 31
' Uses normal font with the bold style
DQBprints VIDEO, "I'm big and fat, I'm bold style!", 0, 10, 31, BOLD
' Uses italic style on the same font
DQBprints VIDEO, "Italic style is very nice", 0, 20, 31, ITALIC
' Uses underlined style again on the same font
DQBprints VIDEO, "Pay attention to underlined text", 0, 30, 31, UNDERLINED
' Uses a combination of styles on the same font
DQBprints VIDEO, "Bold and italic together!", 0, 40, 31, BOLD + ITALIC
' Back to normal text
DQBprint VIDEO, "That's all folks!", 0, 50, 31
' Waits for the user to press a key
WHILE INKEY$ = "": WEND
' Ends program
DQBclose
*****************************************************************************