Project

General

Profile

Drawtext » History » Version 8

Per Amundsen, 02/16/2023 12:25 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3 6 Per Amundsen
*/drawtext -hnrpbocvd <@window> <color> [color] [fontname fontsize] <x y [w h]> <text|&binvar>*
4 1 Per Amundsen
5
Draws text at the specified co-ordinates.
6
7
*Switches*
8
9 8 Per Amundsen
table(ktable).
10
|*Switch*|*Description*|
11
| -p | Processes and interprets control codes in the text. |
12
| -b | Indicates that you have specified the second color parameter as the background color for the text. |
13
| -o | Indicates specified font should be in bold. |
14
| -c | Indicates that you have specified the [w h] values as the rectangle in which text should be printed. Text will be clipped if it extends beyond this rectangle. |
15
| -h | Highlights the windows icon if it is minimized. |
16
| -n | Prevents the display from being updated immediately. |
17
| -r | Indicates that the colors are in [[$rgb]] format. |
18
| -v | Indicates &binvar is specified. |
19
| -d | *TODO* |
20 1 Per Amundsen
21 7 Per Amundsen
*Parameters*
22 2 Per Amundsen
23 8 Per Amundsen
table(ktable).
24
|*Parameter*|*Description*|
25
| <@window> | Name of the window to draw. |
26
| <color> | The textcolor. |
27
| [color] | The background color, if -b has been specified. |
28
| [fontname fontsize] | The name of the font and the size of the font. |
29
| <x y [w h]> | The coordinate of the text. |
30
| <text<notextile>|</notextile>&binvar> | The text or text from a &binvar to draw. |
31 5 Per Amundsen
32
*Example*
33
34
<pre>
35
alias testdrawtext {
36
  window -p @win
37
  drawtext @win 4 Verdana 11 0 0 Hello World
38
}
39
</pre>