{{Short description|Typographical measurement}} {{about|the screen-independent measurement unit|the Irish TV programme|The Week in Politics||TWIP steel}} {{more footnotes needed|date=January 2012}} {{Infobox unit | name = twip | image = | caption = | standard = Typographic units | quantity = Length | units1 = Typographic units | inunits1 = {{sfrac|20}} points | units2 = Imperial/US units | inunits2 = {{sfrac|1440}} in | units3 = Metric (SI) units | inunits3 = {{val|17.64|ul=μm}} }} A '''twip''' (abbreviating "twentieth of a point" or "twentieth of an inch point"<ref>The Free On-line Dictionary of Computing: http://foldoc.org/twip</ref>) is a typographical measurement, defined as {{frac|20}} of a typographical point. One twip is {{frac|1440}} inch, or 17.64 μm.<ref>{{cite web|title=Word 2007: Rich Text Format (RTF) Specification, version 1.9.1|url=https://www.microsoft.com/en-us/download/details.aspx?id=10725|publisher=Microsoft Corporation.|access-date=12 March 2017|page=8|date=19 March 2008}}</ref>
== In computing == 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 {{frac|1440}} of an inch (approximately 17.64 μm).
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<ref>{{Cite web |url=https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa445741(v=vs.60) |title=TwipsPerPixelX, TwipsPerPixelY Properties |website=docs.microsoft.com|date=23 August 2006 }}</ref> or the ScaleX and ScaleY methods.<ref>{{Cite web|url=https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa244168(v=vs.60) |title=ScaleX, ScaleY Methods|website=docs.microsoft.com |date=23 August 2006 }}</ref>
Twips can be used with Symbian OS bitmap images for automatic scaling from bitmap pixels to device pixels.<ref>{{Cite web |url=https://www.25yearsofprogramming.com/c-2/blitting-and-bitmaps.html |title=Blitting and bitmaps - Symbian OS C++|first=Janelle |last=Dueder |date=December 20, 2020 |website=25 Years of Programming}}</ref> 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 {{frac|20}} of a logical pixel,<ref>{{cite web| archive-url=https://web.archive.org/web/20161120220314/adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf |archive-date=2016-11-20 |url=http://www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf | title=SWF FILE FORMAT SPECIFICATION}}</ref> which is {{frac|3|4}} of an actual twip.<ref>[https://developer.mozilla.org/en-US/docs/Glossary/CSS_pixel Flash logical pixels are the same as HTML logical pixels, of which there are 96 to an inch, rather than 72]</ref>
==See also== *Himetric *Thousandth of an inch – a {{frac|1000}} of an inch, commonly called a thou /ˈθaʊ/ (used for both singular and plural) or, particularly in North America, a mil (plural mils).
== References == {{Reflist}} *{{cite book |title=Visual Basic Programmers' Workbook |last=Sparke |first=Gerard |author2=Etherington, Stephen |year=2000 |publisher=Pearson Education Australia |isbn= 978-1-74009-445-0 }} * MSDN Library — [http://msdn.microsoft.com/en-us/library/aa314264(VS.60).aspx com.ms.wfc.ui.CoordinateSystem.TWIP] * Free On-Line Dictionary of Computing — [http://foldoc.org/index.cgi?query=twip twip] * Foundation, ActionScript 3.0 Animation, Making Things Move! by Keith Peters {{ISBN|978-1-59059-791-0}} (pbk) * [https://science-is-amazing.blogspot.com/2013/02/converting-twips-to-pixels-and-vice.html Converting between twips and pixels - Ruby code]
Category:Typography Category:Units of length
{{Typ-stub}}