public static int tp(int twips) { const int nTwipsPerInch = 1440; int dpi = getDPI(); return Convert.ToInt32((twips / (float)nTwipsPerInch) * dpi); }