XRotDrawAlignedString

Section: C Library Functions (3)
Updated: 8 Dec 1992
Index Return to Main Contents
 

NAME

XRotDrawAlignedString, XRotDrawAlignedImageString - draw strings containing newlines in a rotated font, with alignment  

SYNOPSIS

void XRotDrawAlignedString(dpy, rotfont, drawable, gc, x, y, text, align)
Display *dpy;
XRotFontStruct *rotfont;
Drawable drawable;
GC gc;
int x, y;
char *text;
int align

void XRotDrawAlignedImageString(dpy, rotfont, drawable, gc, x, y, text, align)
Display *dpy;
XRotFontStruct *rotfont;
Drawable drawable;
GC gc;
int x, y;
char *text;
int align  

ARGUMENTS

display
Specifies the connection to the X server.
rotfont
An XRotFontStruct structure, returned by XRotLoadFont, describing a rotated font.
drawable
The window or pixmap in which to paint the text.
gc
The graphics context to use when painting text.
x, y
Coordinates whose relation to the postion of the painted text is given by align.
text
A character string.
align
Describes the alignment with which to draw the string.
 

DESCRIPTION

The XRotDrawAlignedString and XRotDrawAlignedImageString functions are both used to paint the character string text in the rotated font described by rotfont.

These functions are capable of drawing strings containing newline characters, by treating these newlines as delimiters to substrings. A substring is painted above, below, left or right of the previous substring depending on the font direction.

The alignment argument align describes how to position the block of substrings in relation to the point (x, y). Align can take one of the values: TLEFT, TCENTRE, TRIGHT, MLEFT, MCENTRE, MRIGHT, BLEFT, BCENTRE, BRIGHT. Note that alignment refers to a rotated set of axes; e.g. for a font rotated at 90 degrees, the `vertical' direction actually runs East-West on the screen. The first character describes how the block is positioned `vertically' with respect to the reference point; T=Top, M=Middle, B=Bottom. The remaining phrase describes 'horizontal' positioning; LEFT, CENTRE or RIGHT. The value MCENTRE
 centres the block at the reference point. See the manual page for xvertext for more details of alignment.

The two functions differ in that XRotDrawAlignedString leaves the background pixels untouched, drawing the text in the foreground colours of gc. XRotDrawAlignedImageString fills the background in with the background colour of gc before painting the text. Note that only the foreground and background attributes of gc are used by these functions.  

SEE ALSO

xvertext, XRotVersion, XRotLoadFont, XRotUnloadFont, XRotTextWidth, XRotDrawString, XRotDrawImageString.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 00:35:30 GMT, March 26, 2025