Text Operations

A graphics context provides two text drawing primitives.

  • Draw text from a co-ordinate point

    This draws the text from the co-ordinate point toward the right, justified according to the graphics context settings. The x co-ordinate aligns with the left side of the first character; the y co-ordinate with the baseline of the string.

  • Draw text within a box

    This draws text within a box, justified and aligned according to the graphics context settings and parameters to the function call, and clipped to the box. Any other area within the box is painted with the brush color.

The text is drawn in the pen color and drawing mode. Pen style and pen width are ignored.

Related concepts