Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Escape! V3.0 - <b>hps2m()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpS2M()

Determine length of string in millimeters


Syntax

hpS2M(<cString>)


Parameters

<cString>
The text that is to be measured.


Returns

<n>
Length of string in millimeters.

-12
Wrong number of parameters was specified.


Remarks

Using proportional fonts can be difficult, but hpS2M() makes certain
tasks much easier.  Surrounding a proportional string of unknown length
with a box would be almost impossible without it, with it is easy as the
examples show.


Support By

All HP Laserjet Printers


Example

cText := 'This should be surrounded by a box'
hpAtSay(60, 100, cText, 'M')
****
* surround with 5mm margin on all four sides
****
hpBox(55, 95, 65, 60+hpS2M(cText)+5, 1, 'M')

To highlight a string with gray shade:

cText := 'This should be highlighted with gray bar'
hpAtSay(100, 100, cText, 'M')
hpGrayBar(100, 100, hpS2M(cText), 0, 10, 'M')

See Also: hpC2M() hpL2M() hpS2I()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson