Converts between pixels and twips.
t# = PixelsToTwipX(p#)
t# = PixelsToTwipY (p#)
p# = TwipsToPixelX(t#)
p# = TwipsToPixelY(t#)
p, t | : Double numeric expression |
With PixelsToTwipX and TwipsToPixelX values can be converted on the horizontal plane.
With PixelsToTwipY and TwipsToPixelY values can be converted on the vertical plane.
The Pixel to Twip and Twip to Pixel properties of the Screen property contain the conversion factors for these functions.
Debug.Show
Trace _X
Trace TwipsToPixelX(1) // Pixel to Twips (horizontally)
Trace PixelsToTwipX(_X) // Width in Twips
Trace _Y
Trace TwipsToPixelY(1) // Pixel to Twips (vertically)
Trace PixelsToTwipY(_Y) // Height in Twips
HimetsToPixelX(), HimetsToPixelY(), PixelsToHimetX(), PixelsToHimetY(), Screen
{Created by Sjouke Hamstra; Last updated: 03/03/2018 by James Gaite}