You are here

protected static function PHPExcel_Reader_Excel2003XML::_pixel2WidthUnits in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2003XML.php \PHPExcel_Reader_Excel2003XML::_pixel2WidthUnits()

* pixel units to excel width units(units of 1/256th of a character width) *

Parameters

pxs: * @return

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2003XML.php, line 259

Class

PHPExcel_Reader_Excel2003XML
PHPExcel_Reader_Excel2003XML

Code

protected static function _pixel2WidthUnits($pxs) {
  $UNIT_OFFSET_MAP = array(
    0,
    36,
    73,
    109,
    146,
    182,
    219,
  );
  $widthUnits = 256 * ($pxs / 7);
  $widthUnits += $UNIT_OFFSET_MAP[$pxs % 7];
  return $widthUnits;
}