Xbasic

UI_SCREEN_DRAW Function

Syntax

L UI_SCREEN_DRAW(C drawing_code)

Arguments

drawing_code

One or more Xbasic commands that modify the image. The command string begins with an starting string, such as <<%code%, and concludes with an ending string, such as %code%. Each command is on a separate line, starting with the line after <<%code%.

Description

Draw directly to the screen or simply use the context to get metrics.

Discussion

The UI_SCREEN_DRAW() function writes directly to the Windows display. It can be used to determine the size of a bitmap object that would be later printed. The function supports the same drawing code as UI_BITMAP_DRAW().

Example

ui_screen_draw(<<%code%
set_font("Verdana,20")
text("Sample",3,3)
ui_msg_box("Width",""+text_width("Sample"))
%code%)

Limitations

Desktop applications only.

See Also