Commit de429dde authored by Claudio Valerio's avatar Claudio Valerio

fixed the transfomation persistance for polygons

parent 7220a630
......@@ -1693,6 +1693,7 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::polygonItemToSvgPolygon(UBGraphicsPo
QString points = pointsToSvgPointsAttribute(polygon);
mXmlWriter.writeAttribute("points", points);
mXmlWriter.writeAttribute("transform",toSvgTransform(polygonItem->sceneMatrix()));
mXmlWriter.writeAttribute("fill", polygonItem->brush().color().name());
qreal alpha = polygonItem->brush().color().alphaF();
......@@ -1781,6 +1782,16 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol
polygonItem->setPolygon(polygon);
QStringRef svgTransform = mXmlReader.attributes().value("transform");
QMatrix itemMatrix;
if (!svgTransform.isNull())
{
itemMatrix = fromSvgTransform(svgTransform.toString());
polygonItem->setMatrix(itemMatrix);
}
QStringRef svgFill = mXmlReader.attributes().value("fill");
QColor brushColor = pDefaultColor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment