Please enable JavaScript to view this site.

A-Shell Development History

GDI printing enhancement - new variation of the //TEXTRECTANGLE directive:

//TEXTRECTANGLE, left, top, right, bottom, flags, text

This variation (identified by the six parameters) is both simpler to use than the traditional multi-part //TEXTRECTANGLE sequence, but also offers some additional features such as multi-line horizontal and vertical centering.

flags may be any sensible combination of the following:

Flag

Value

Meaning

TRF_TOP

&h00000000

top justification

TRF_LEFT

&h00000000

left justification

TRF_HCENTER

&h00000001

horizontal centering

TRF_RIGHT

&h00000002

right justification

TRF_VCENTER

&h00000004

vertical centering

TRF_BOTTOM

&h00000008

bottom justification

TRF_WORDBREAK

&h00000010

wrap the text onto multiple lines

TRF_SINGLELINE

&h00000020

output text as a single line

TRF_EXPANDTABS

&h00000040

expand tabs (8 spaces each)

TRF_NOCLIP

&h00000100

no clipping

TRF_EXTERNALLEADING

&h00000200

incl. ext. leading in spacing

TRF_CALCRECT

&h00000400

calc only (use with MX_GDICALC)

TRF_PATH_ELLIPSIS

&h00004000

path ellipsis

TRF_END_ELLIPSIS

&h00008000

end ellipsis

TRF_WORD_ELLIPSIS

&h00040000

word ellipsis

 

As with other GDI printer directives, the flags can be specified as a decimal value, hex value, or using the symbol names.

text may be any string of up to 2048 characters. It may include "^M" symbol(s) to indicate hard CRLF(s).