NMeasureJust
styleRunPosition, numer, denom );
Ptr textPtr; address of a text string long textLength ; value for text length
Fixed slop ; value indicating extra pixels Ptr charLocs ; pointer to an array of textLength+1 integers JustStyleCode styleRunPosition ; the position of a style run within the line
Point denom ; scaling factor NMeasureJust computes the width from the beginning of the string to the trailing edge of each character, taking into account slop, scaling, and style run
position. On return, the first charLocs entry contains 0; remaining entries
contain the widths to the corresponding offsets in the string.
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 after it has
been scaled.
charLocs is a pointer to an array of textLength+1 integers where
textLen is the number of bytes.
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. See below
for a list of values and meanings for these constants.
numer is a scaling factor denom is a scaling factor
Notes: 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. The behavior for
routines, the text length should equal the entire visible part of the
style run on a line and should include trailing spaces if and only if
they are displayed. (They may not be displayed for the last style run
in the line, for example.) Otherwise, the results for the last
character on the line may be in valid.