getXmlWriter(); $style = $this->getStyle(); if (!$style instanceof LineStyle) { return; } $dash = $style->getDash(); $dashStyles = [ LineStyle::DASH_STYLE_DASH => 'dash', LineStyle::DASH_STYLE_ROUND_DOT => '1 1', LineStyle::DASH_STYLE_SQUARE_DOT => '1 1', LineStyle::DASH_STYLE_DASH_DOT => 'dashDot', LineStyle::DASH_STYLE_LONG_DASH => 'longDash', LineStyle::DASH_STYLE_LONG_DASH_DOT => 'longDashDot', LineStyle::DASH_STYLE_LONG_DASH_DOT_DOT => 'longDashDotDot', ]; $xmlWriter->startElement('v:stroke'); $xmlWriter->writeAttributeIf($style->getWeight() !== null, 'weight', $style->getWeight() . 'pt'); $xmlWriter->writeAttributeIf($style->getColor() !== null, 'color', $style->getColor()); $xmlWriter->writeAttributeIf($style->getBeginArrow() !== null, 'startarrow', $style->getBeginArrow()); $xmlWriter->writeAttributeIf($style->getEndArrow() !== null, 'endarrow', $style->getEndArrow()); if ($dash !== null) { if (isset($dashStyles[$dash])) { $xmlWriter->writeAttribute('dashstyle', $dashStyles[$dash]); } if ($dash == LineStyle::DASH_STYLE_ROUND_DOT) { $xmlWriter->writeAttribute('endcap', 'round'); } } $xmlWriter->endElement(); //v:stroke } }