You are here

public function PHPExcel_Worksheet_BaseDrawing::setWidth in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/BaseDrawing.php \PHPExcel_Worksheet_BaseDrawing::setWidth()

Set Width

Parameters

int $pValue:

Return value

PHPExcel_Worksheet_BaseDrawing

1 method overrides PHPExcel_Worksheet_BaseDrawing::setWidth()
PHPExcel_Worksheet_HeaderFooterDrawing::setWidth in vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php
Set Width

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/BaseDrawing.php, line 321

Class

PHPExcel_Worksheet_BaseDrawing
PHPExcel_Worksheet_BaseDrawing

Code

public function setWidth($pValue = 0) {

  // Resize proportional?
  if ($this->_resizeProportional && $pValue != 0) {
    $ratio = $this->_height / ($this->_width != 0 ? $this->_width : 1);
    $this->_height = round($ratio * $pValue);
  }

  // Set width
  $this->_width = $pValue;
  return $this;
}