OpenRM - RM Library (rmxtext.c)

## Index of OpenRM - RM Library

     RMenum rmTextGetExtents (const char *string,
    		          int fontEnum,
    			  int sizeEnum,
    			  int boldEnum,
    			  int italicEnum,
    			  int *widthReturn,
    			  int *heightReturn,
    			  const RMpipe *renderPipe)

     const char *string - a character string (input).

     int fontEnum - an integer value specifying a font family. May be one
        of RM_FONT_SERIF, RM_FONT_SANS, RM_FONT_MONO, RM_FONT_SYMBOL or
        RM_FONT_DINGBATS (input).

     int sizeEnum - an integer font size enumerator. May be one of
        RM_FONT_XXS, RM_FONT_XS, RM_FONT_S, RM_FONT_M, RM_FONT_L,
        RM_FONT_XL, RM_FONT_XXL.

     int boldEnum, italicEnum - integer values indicating whether or not
        to the text string is in boldface or italicized. Valid values are
        RM_TRUE or RM_FALSE (input).

     int *widthReturn, *heightReturn - pointers to integers. The width and
        height of the rendered text string is returned in through these
        parameters.  Values of NULL are acceptable (return).

     const RMpipe *renderPipe - a handle to an RMpipe (input).

Use this routine to obtain the pixel dimensions of the bounding box of a text string. The text string may be rendered in one of a number of fonts, at one of a number of pre-specified sizes and with or without emboldening or italicization.

This routine doesn't actually cause any rendering to occur on-screen, but does require that RM be completely initialized.

10/2000 - Added the renderPipe parameter.

Returns RM_CHILL upon success, or RM_WHACKED upon failure.

Either, or both, of widthReturn or heightReturn may be NULL, indicating the application is not interested in those values.

librm library source file: rmxtext.c