DRAW_CHARACTERS@

Platform

Win32, x64

Purpose

To draw text on the current drawing surface.

Syntax

SUBROUTINE DRAW_CHARACTERS@(STR,IH,IV,ICOL)
CHARACTER(*) STR
INTEGER IH,IV,ICOL

Description

DRAW_CHARACTERS@ draws text, using the current font and attributes, at the point (IH, IV). These co-ordinates represent the bottom left-hand corner of the first character. STR contains the character string to be drawn. The text is positioned to the nearest pixel. ICOL provides the colour for the text that appears on the existing background using the current colour mode.

It is recommended that a call be made to SELECT_FONT@ be made before calling DRAW_CHARACTERS@.

DRAW_CHARACTERS@ can be used in GDI+ mode but the display may not match that produced by the GDI. When porting from GDI to GDI+ and a match is important, users might consider mixed GDI/GDI+ drawing (GDI for characters, GDI+ for lines) provided no use is made of metafiles.

When using the GDI, the height and width of characters can be set independently (using SIZE_IN_PIXELS@ etc.). In contrast, when using the GDI+, only the height can be transmitted and a specified width is ignored. The result is that the GDI/GDI+ heights will match but the string widths may not (the design decision within ClearWin+ is that to match the heights is paramount). When it is expedient to use GDI+ for drawing characters and the when it is important to match the string width rather than the character height, ClearWin+ provides a function called GET_TEXT_HEIGHT@ that provides the adjusted height of a given string such that its GDI+ width matches its GDI width.

See also

Using GDI+, SELECT_FONT@, SCALE_FONT@, UNDERLINE_FONT@, ITALIC_FONT@,
BOLD_FONT@, SIZE_IN_PIXELS@, SIZE_IN_POINTS@, ROTATE_FONT@,
GET_FONT_NAME@, CHOOSE_FONT@.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited