[]
        
(Showing Draft Content)

C1.Excel.C1XLBook.PixelsToTwips

PixelsToTwips Method

PixelsToTwips(double)

Converts a pixel measurement into twips (1/20th of a point).

Declaration
public static int PixelsToTwips(double pix)
Parameters
Type Name Description
double pix

Measurement in screen pixels.

Returns
Type Description
int

Measurement in twips.

Remarks
<p>Excel stores measurements in twips (1/20th of a point), a 

resolution-independent unit. .NET controls, on the other hand, usually express measurements in pixels. This method provides an easy way to convert pixel measurements into twips using the current screen resolution.

TwipsToPixels(double)