PhpOffice\PhpPresentation\Writer\ODPresentation\ObjectsChart::writeTitleStyle PHP Method

writeTitleStyle() private method

private writeTitleStyle ( PhpOffice\PhpPresentation\Shape\Chart\Title $oTitle )
$oTitle PhpOffice\PhpPresentation\Shape\Chart\Title
    private function writeTitleStyle(Title $oTitle)
    {
        if (!$oTitle->isVisible()) {
            return;
        }
        // style:style
        $this->xmlContent->startElement('style:style');
        $this->xmlContent->writeAttribute('style:name', 'styleTitle');
        $this->xmlContent->writeAttribute('style:family', 'chart');
        // style:text-properties
        $this->xmlContent->startElement('style:text-properties');
        $this->xmlContent->writeAttribute('fo:color', '#' . $oTitle->getFont()->getColor()->getRGB());
        $this->xmlContent->writeAttribute('fo:font-family', $oTitle->getFont()->getName());
        $this->xmlContent->writeAttribute('fo:font-size', $oTitle->getFont()->getSize() . 'pt');
        $this->xmlContent->writeAttribute('fo:font-style', $oTitle->getFont()->isItalic() ? 'italic' : 'normal');
        // > style:text-properties
        $this->xmlContent->endElement();
        // > style:style
        $this->xmlContent->endElement();
    }