Twip

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

A twip (abbreviating "twentieth of a point", "twentieth of an inch point",[1] or "twentieth of an Imperial point"[citation needed]) is a typographical measurement, defined as 120 of a typographical point. One twip is 11440 inch, or 17.64 μm.[2]

In computing[edit]

Twips are screen-independent units to ensure that the proportion of screen elements are the same on all display systems. A twip is defined as being 11440 of an inch (approximately 0.0176 mm).

A pixel is a screen-dependent unit, standing for 'picture element'. A pixel is a dot that represents the smallest graphical measurement on a screen. Twips are the default unit of measurement in Visual Basic (version 6 and earlier, prior to VB.NET). Converting between twips and screen pixels is achieved using the TwipsPerPixelX and TwipsPerPixelY properties[3] or the ScaleX and ScaleY methods.[4]

Twips can be used with Symbian OS bitmap images for automatic scaling from bitmap pixels to device pixels.[5] They are also used in Rich Text Format from Microsoft for platform-independent exchange and they are the base length unit in OpenOffice.org and its fork LibreOffice.

Flash internally specifies most sizes in units it calls twips, but which are really 120 of a logical pixel,[6] which is ¾ of an actual twip.[7]

See also[edit]

References[edit]

  1. ^ The Free On-line Dictionary of Computing: http://foldoc.org/twip
  2. ^ "Word 2007: Rich Text Format (RTF) Specification, version 1.9.1". Microsoft Corporation. 19 March 2008. p. 8. Retrieved 12 March 2017.
  3. ^ https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa445741(v=vs.60)
  4. ^ https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa244168(v=vs.60)
  5. ^ https://25yearsofprogramming.com/c-2/blitting-and-bitmaps.html
  6. ^ https://web.archive.org/web/20161120220314/adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf
  7. ^ Flash logical pixels are the same as HTML logical pixels, of which there are 96 to an inch, rather than 72: https://developer.mozilla.org/en-US/docs/Glossary/CSS_pixel