Tool TEXT

From RealWorld Wiki

Jump to: navigation, search

TEXT is a drawing tool capable of drawing simple text. The text uses selected font name, style and size.

To draw text in the user interface, click anywhere in the raster editor and text will be inserted at that position. Until user clicks on Apply (or finishes the action using another way), text can be modified by simply typing on the keyboard, color, font and style can be changed as well.

[edit] Scripting parameters

TEXT tool can be used from scripts. The command in script must have 4 parameters:

  • font_name - name of the font.
  • style (optional) - one of "NORMAL" (default), "BOLD", "ITALIC", and "BOLDITALIC".
  • size - font size in pixels.
  • pos_X, pos_Y - coordinates of the top-left corner of the rectangle with the text.
  • text - the text to print.

[edit] Example

Document.TEXT(Document, "Arial", 20, 100, 100, "Sample text");
Personal tools