/** * sets background color * * @param string $backgroundColor */ public function setBackgroundColor($backgroundColor) { $this->_backgroundColor = $backgroundColor; if ($this->_backgroundColor && $this->_colorTable) { $this->_colorTable->add($this->_backgroundColor); } }
/** * @dataProvider provideGetColorIndex * @param PHPRtfLite_DocHead_ColorTable $colorTable * @param string $color * @param integer $colorIndex */ public function testGetColorIndex(PHPRtfLite_DocHead_ColorTable $colorTable, $color, $colorIndex) { $colorTable->add($color); $this->assertEquals($colorIndex, $colorTable->getColorIndex($color)); }
/** * sets rtf color table * * @param PHPRtfLite_DocHead_ColorTable $colorTable */ public function setColorTable(PHPRtfLite_DocHead_ColorTable $colorTable) { if (!empty($this->_color)) { $colorTable->add($this->_color); } if (!empty($this->_backgroundColor)) { $colorTable->add($this->_backgroundColor); } $this->_colorTable = $colorTable; }
/** * sets rtf color table * * @param PHPRtfLite_DocHead_ColorTable $colorTable */ public function setColorTable(PHPRtfLite_DocHead_ColorTable $colorTable) { if ($this->_color) { $colorTable->add($this->_color); } $this->_colorTable = $colorTable; }