GrGetGCTextSize

Name

GrGetGCTextSize -- Return the size of a text string for a particular graphics context

Synopsis

void GrGetGCTextSize (
  GR_GC_ID   gc,        /* graphics context containing font */
  GR_CHAR  * cp,        /* address of text string */
  GR_SIZE    len,       /* length of text string */
  GR_SIZE  * retwidth,  /* returned width of string */
  GR_SIZE  * retheight, /* returned height of string */
  GR_SIZE  * retbase    /* returned height of baseline */
);

Parameters

gc

The graphics context ID number.

cp

A text string.

len

The number of characters in the cp string.

retwidth

The returned width of the string.

retheight

The returned height of the string.

retbase

The returned height of the baseline above the bottom of the string.

Description

The GrGetGCTextSize function calculates the size of the first len charecters of the cp string using the font characteristic specified in the gc graphics context. All returned sizes measure pixels.