Xbasic

DRAW_WRAP_SCRIPT Function

Syntax

V DRAW_WRAP_SCRIPT(C text,N XPos,N YPos,N Width,N Height[,N offset])

Arguments

text

The text to write.

XPos

The horizontal coordinate of the upper left corner of the bounding box.

YPos

The vertical coordinate of the upper left corner of the bounding box.

Width

The width of the bounding box.

Height

The height of the bounding box.

offset

The position of the text relative to the left margin. Must be greater than or equal to 1.

Description

DRAW_WRAP_SCRIPT() draws word wrapped text onto a bitmap. It also applies standard Code Editor colorization to text elements such as Comments.

Example

Refer to DRAW_WRAP_TEXT()for more examples.

images/GR_draw_wrap_script.gif
ui_bitmap_create("test", 4, 2)
word_wrap_text = <<%a%
This is an example of how we can do word wrap text on the page. The following line is a comment.
'Alpha Anywhere gives you fantastic control over every aspect of how you output text to the printer.
This is an example of the DRAW_WRAP_SCRIPT() function.
%a%
ui_bitmap_draw("test",<<%code%
inner_Rect(0, 0, 4, 2)
set_font("arial,10", "black", "white")
offset=draw_wrap_script(word_wrap_text, .5, .4, 3, 1.5, 1)
%code%)
ui_dlg_box("","{image=test}")

Limitations

Used in the Code section of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also