Personal tools
From wiki.swiftlytilting.com
Jump to: navigation, search

WinBinder Manual/wb draw text

Draws a string.

bool wb_draw_text (int target, string text, int xpos, int ypos [, int width, int height [, int font [, int flags]]])

or

bool wb_draw_text (int target, string text, int xpos, int ypos [, int font])
  • target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
  • The text parameter is the string to be drawn.
  • xpos and ypos are the coordinates of the upper-left corner, in pixels.
  • width and height optionally provide a limit to the drawing area. If they are not provided or zero, there is no limit to the drawing area. To use a specific font, an identifier created with <winterpostwiki>wb_create_font</winterpostwiki>() must be used as the font argument. If font is NULL, negative or not given, the most recently created font is used.

NOTE: To use the simplified call syntax (no width, no height) you must supply 4 or 5 parameters.

Flags

The following constants may be used in combination as the flag parameter:

  • WBC_LEFT
  • WBC_CENTER
  • WBC_RIGHT
  • WBC_TOP
  • WBC_MIDDLE
  • WBC_BOTTOM
  • WBC_MULTILINE
  • WBC_ELLIPSIS

The default is zero (WBC_LEFT | WBC_MIDDLE).

Returns

Returns TRUE on success or FALSE if an error occurs.

See also

Winbinder Projects