<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > Undercover and Graphics > Undercover Operations |
MiniRobotLanguage (MRL)
UCV.write
UCV.wri
Print graphical text on to the cover
Intention
This command will print text in the actual foreground color. Use the "UCV.foreground" command to set the foreground color. "UCV.write" will use the font that you can set using the "UCV.set font" command.
General usage is simple:
UCV.nbi
UCV.grd|&H00FF00
' Set red foreground color
UCV.fgr|&HFF0000
' Print in red onto the green background
UCV.write|Hello world!
' We change color to yellow
UCV.fgr|&HFFFF00
UCV.wri|Hello world!|200,200
' This will remove the Cover
PAU.5
UCV.
ENR.
Will look like this:
UCV.write will not automatically do a "word wrap". Therefore avoid words that do not fit into a line, as these may be cut off at the end otherwise. Use the "UCV.print" for such cases to have word wrap.
UCV.write will allow you to exactly specify the top,left corner of the text to print. Like this:
UCV.write|Hello world!|100,100
UCV.write will allow you further, to specify an alignment as a third parameter:
UCV.write|Hello world!|100,100|2
See below for details.
Syntax
UCV.write|P1[|P2,P3][|P4]
UCV.wri|P1|[|P2,P3][|P4]
Parameter Explanation
P1 - Text to write on to the Cover.
P2 - (optional) - X-Position value of the text to be printed, in pixels, screen
coordinates.
P3 - (optional) - Y-Position value of the text to be printed, in pixels, screen
coordinates.
P4 - (optional) - number between 1 and 4 that specifies the text-alignment.
If omitted 1 is default.
LEFT = 1
RIGHT = 2
CENTER = 3
JUSTIFY = 4
Example
'***********************************
' UCV.-Sample
' Shows scrolling text
'***********************************
'
$$TXT=Hallo my dear, try the PRINT command also ....
STR.CLONE|$$TXT|160|$$TXT
' no fading
UCV.nb
' set foreground color
UCV.fgr|&HFF0000
' set transparent background color
UCV.bgr|-1
UCV.mat
UCV.set font|futura t|40|||0
UCV.wri|$$TXT
PAU.4
UCV.
ENR.
'***********************************
' UCV.-Sample 2
'
'***********************************
'
' Make a completely red cover
UCV.bgr|&H0000FF
UCV.cov
' Here comes your script, we use a PAUSE command instead
PAU.5
' Switch cover color to yellow
UCV.bgr|&H00FFFF
' Print on the cover screen
UCV.write|Hello world||2
' This will remove the Cover
UCV.
ENR.
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's Undercover Operations
• ! UCV. - Undercover Graphics