newt_draw_root_text

(PECL newt >= 0.1)
Displays the string text at the position indicated
void newt_draw_root_text ( int $left, int $top, string $text )

Displays the string text at the position indicated.

Parameters:
left

Column number

Note:

If left is negative, the position is measured from the opposite side of the screen.

top

Line number

Note:

If top is negative, the position is measured from the opposite side of the screen.

text

Text to display.

Returns:

No value is returned.

Examples:
A newt_draw_root_text() example

This code demonstrates drawing of titles in the both corners of the screen.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
 newt_init();
 newt_cls();
 
 newt_draw_root_text (2, 0, "Some root text");
 newt_refresh();
 sleep(1);
 
 newt_draw_root_text (-30, 0, "Root text in the other corner");
 newt_refresh();
 sleep(1);
 
 newt_finished();
?>
See also:

newt_push_help_line() -

newt_pop_help_line() -

doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.