NDrawJust
NDrawJust Draw text at current pen location
#include <Script.h> Script Manager
void NDrawJust( textPtr, textLength, slop, styleRunPosition, numer,
denom );
Ptr textPtr ; address of a text string
long textLength ; value for text length
Fixed slop ; value indicating extra pixels
JustStyleCode styleRunPosition; the position of a style run within the line
Point numer; scaling factor
Point denom; scaling factor
NDrawJust supplies a more powerful version of DrawJust that works
with inter-character spacing, lets you indicate the position of a style run
within a line for lines with multiple style runs, and accepts scaling
parameters.
textPtr is a text string indicated by a pointer.
textLength is the length of the specified string.
slop is the number of pixels to add to a string's width when it is drawn
(to help justify the text).
styleRunPosition For correct spacing between multiple style runs, you can specify
the position of a style run within the line by using the
styleRunPosition parameter of type JustStyleCode
numer is a scaling factor
denom is a scaling factor
Returns: none

Notes: The NDrawJust procedure draws the given text at the current pen
location in the current font, style, and size. The slop parameter indicates
how many extra pixels are to be added to the width of the text after it has
been scaled according to the numer and denom parameters. This routine is
useful for justifying text. For correct spacing between multiple style runs,
you can specify the position of a style run within the line by using the
styleRunPosition parameter of type JustStyleCode. See below for a list of
values and meanings for these constants.
To handle the spacing between multiple style runs on a line correctly, the
new justification routines take a styleRunPosition parameter that specifies
the position of the style run on a line.
The values for styleRunPosition are as follows:
Constant Meaning
smOnlyStyleRun This style run is the only one on the line.
smLeftStyleRun Multiple style runs are on the line, and this is the
leftmost.
smRightStyleRun Multiple style runs are on the line, and this is the
rightmost.
smMiddleStyleRun Multiple style runs are on the line, and this is
neither the leftmost nor the rightmost.
If styleRunPosition has the value smOnlyStyleRun, the justification
routines behave exactly like their earlier versions. For other values of
styleRunPosition, the behavior may depend on the script. See
Justifying Text on the Roman Script System for a de scription of
the behavior of Roman script.