gpi12.hlp (Table of Contents; Topic list)
GpiSetCharBox (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiSetCharBox(hps, psizfxBox)
HPS hps;             /* presentation-space handle                    */
PSIZEF psizfxBox;    /* address of structure with character-box size */
 
The GpiSetCharBox function sets the current character-box attribute to the
specified value. The character-box attribute specifies the width and height
of the character box. The character box determines the spacing of
consecutive characters along the baseline and the orientation of characters
relative to the baseline.
 
Both width and height can be positive, negative, or zero. When either value
is negative, the spacing occurs in the opposite direction to normal and each
character is drawn reflected in character-mode 3. For example, a negative
height in the standard direction in mode 3 means that the characters are
drawn upside down and the string is drawn below the baseline (assuming no
other transformations cause inversion). A zero character width or height is
also valid; in this case, the string of characters collapses into a line. If
both values are zero, the string is drawn as a single point.
 
If the attribute mode is AM_PRESERVE, the function saves the previous
character-box attribute on the attribute stack when it sets the new
character box. The previous character-box attribute can be retrieved by
using the GpiPop function.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
psizfxBox  Points to a SIZEF structure that contains the width and height of
           the character box in world coordinates.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_HPS
     PMERR_PS_BUSY
 
See Also
 
GpiQueryCharBox, GpiSetAttrMode, GpiSetAttrs, SIZEF