Difference between revisions of "PRINTMODE"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 14: Line 14:
 
:*'''_ONLYBACKGROUND''' (mode 2): Text background is only displayed. Text is transparent to anything behind it.
 
:*'''_ONLYBACKGROUND''' (mode 2): Text background is only displayed. Text is transparent to anything behind it.
 
:*'''_FILLBACKGROUND''' (mode 3): Text and background block anything behind them like a normal [[PRINT]]. Default setting.
 
:*'''_FILLBACKGROUND''' (mode 3): Text and background block anything behind them like a normal [[PRINT]]. Default setting.
* Use the [[_PRINTMODE (function)]] to find the current _PRINTMODE setting number.
+
* Use the [[_PRINTMODE (function)]] to find the current _PRINTMODE setting mode number.
 
* '''NOTE: The _PRINTMODE statement and function can only be used in graphic screen modes, NOT SCREEN 0'''
 
* '''NOTE: The _PRINTMODE statement and function can only be used in graphic screen modes, NOT SCREEN 0'''
  

Revision as of 20:51, 10 March 2011

The _PRINTMODE statement sets the font printing mode on a background image when using PRINT or _PRINTSTRING.


Syntax

_PRINTMODE mode[,image_handle]


Description

  • If the image handle is omitted it will use the current destination image background.
  • One of 3 mode keywords is mandatory when using this statement to deal with the text background.
  • _KEEPBACKGROUND (mode 1): Text background transparent. Only the text is displayed over anything behind it.
  • _ONLYBACKGROUND (mode 2): Text background is only displayed. Text is transparent to anything behind it.
  • _FILLBACKGROUND (mode 3): Text and background block anything behind them like a normal PRINT. Default setting.
  • Use the _PRINTMODE (function) to find the current _PRINTMODE setting mode number.
  • NOTE: The _PRINTMODE statement and function can only be used in graphic screen modes, NOT SCREEN 0


Example: Using _PRINTMODE with PRINT in a graphic screen mode.

SCREEN 12 number = 69 COLOR 8: LOCATE 10, 10: PRINT STRING$(4, 219) _PRINTMODE _KEEPBACKGROUND COLOR 15: LOCATE 10, 10: PRINT number END


See also




Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page