hpux man page for xdrawtext

Query: xdrawtext

OS: hpux

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

XDrawText()															       XDrawText()

Name
  XDrawText - draw 8-bit polytext strings.

Synopsis
  XDrawText(display, drawable, gc, x, y, items, nitems)
	Display *display;
	Drawable drawable;
	GC gc;
	int x, y;
	XTextItem *items;
	int nitems;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  drawable  Specifies the drawable.

  gc	    Specifies the graphics context.

  x	    Specify the x and y coordinates of the baseline starting position for the initial string, relative to the origin of the specified
  y	    drawable.

  items     Specifies a pointer to an array of text items.

  nitems    Specifies the number of text items in the items array.

Description
  XDrawText() is capable of drawing multiple strings on the same horizontal line and changing fonts between strings.  Each  XTextItem  struc-
  ture	contains  a string, the number of characters in the string, the delta offset from the starting position for the string, and the font.
  Each text item is processed in turn.	The font in each XTextItem is stored in the specified GC and used for subsequent text.	If the	XTex-
  tItem.font  is  None, the font in the GC is used for drawing and is not changed.  Switching between fonts with different drawing directions
  is permitted.

  The delta in each XTextItem specifies the change in horizontal position before the string is drawn.  The delta is always added to the char-
  acter  origin  and  is not dependent on the draw direction of the font.  For example, if x = 40, y = 20, and items[0].delta = 8, the string
  specified by items[0].chars would be drawn starting at x = 48, y = 20.  The delta for the second string begins at the rbearing of the  last
  character in the first string.  A negative delta would tend to overlay subsequent strings on the end of the previous string.

  Only the pixels selected in the font are drawn (the background member of the GC is not used to fill the bounding box).

  In all X releases, there is a limit to the number and size of strings that can be drawn in a single XDrawText() call, that varies according
  to the server.  To determine how much text you can draw in a single call, you find out your server's maximum	request  size  using  XMaxRe-
  questSize().	 Subtract four, and then subtract ((strlen(string)+2)/4) for each string.  This is the maximum amount of text you can draw in
  a single XDrawText() call.

  XDrawText() uses the following elements in the  specified  GC:  function,  plane_mask,  fill_style,  font,  subwindow_mode,  clip_x_origin,
  clip_y_origin,  and  clip_mask.   This  function also uses these graphics context mode-dependent components:	foreground, background, tile,
  stipple, ts_x_origin, and ts_y_origin.

  For more information, see Volume One, Chapter 6, Drawing Graphics and Text, and Chapter 5, The Graphics Context.

Structures
     typedef struct {
	 char *chars;	 /* pointer to string */
	 int nchars;	 /* number of characters */
	 int delta;	 /* delta between strings */
	 Font font;	 /* font to print it in, None don't change */
     } XTextItem;

Errors
  BadDrawable
  BadFont
  BadGC
  BadMatch

See Also
  XDrawImageString(), XDrawImageString16(), XDrawString(), XDrawString16(), XDrawText16(), XQueryTextExtents(), XQueryTextExtents16(),	XTex-
  tExtents(), XTextExtents16(), XTextWidth(), XTextWidth16().

Xlib - Text															       XDrawText()
Related Man Pages
xdrawtext(3x11) - osf1
xtextitem16(3) - centos
xdrawtext(3) - hpux
xtextitem(3x11) - osf1
xtextitem16(3x11) - osf1
Similar Topics in the Unix Linux Community
How to extract every repeated string between two specific string?
Sequence extraction
Seeking Alternative for diff in hp
Shopt -s histappend