You are here

private function PHPExcel_Writer_Excel2007_Style::_writeGradientFill in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php \PHPExcel_Writer_Excel2007_Style::_writeGradientFill()

* Write Gradient Fill * *

Parameters

PHPExcel_Shared_XMLWriter $objWriter XML Writer: * @param PHPExcel_Style_Fill $pFill Fill style * @throws PHPExcel_Writer_Exception

1 call to PHPExcel_Writer_Excel2007_Style::_writeGradientFill()
PHPExcel_Writer_Excel2007_Style::_writeFill in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php
* Write Fill * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php, line 195

Class

PHPExcel_Writer_Excel2007_Style
PHPExcel_Writer_Excel2007_Style

Code

private function _writeGradientFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) {

  // fill
  $objWriter
    ->startElement('fill');

  // gradientFill
  $objWriter
    ->startElement('gradientFill');
  $objWriter
    ->writeAttribute('type', $pFill
    ->getFillType());
  $objWriter
    ->writeAttribute('degree', $pFill
    ->getRotation());

  // stop
  $objWriter
    ->startElement('stop');
  $objWriter
    ->writeAttribute('position', '0');

  // color
  $objWriter
    ->startElement('color');
  $objWriter
    ->writeAttribute('rgb', $pFill
    ->getStartColor()
    ->getARGB());
  $objWriter
    ->endElement();
  $objWriter
    ->endElement();

  // stop
  $objWriter
    ->startElement('stop');
  $objWriter
    ->writeAttribute('position', '1');

  // color
  $objWriter
    ->startElement('color');
  $objWriter
    ->writeAttribute('rgb', $pFill
    ->getEndColor()
    ->getARGB());
  $objWriter
    ->endElement();
  $objWriter
    ->endElement();
  $objWriter
    ->endElement();
  $objWriter
    ->endElement();
}