1346 {
1347 if (el.hasAttribute("fill")) {
1348 if (el.attribute("fill") != "none") {
1349 QColor c = QColor(el.attribute("fill"));
1350
1351 styleDict["/FillFlag"] = true;
1352 styleDict["/FillColor"] = QVariantHash({ {"/StreamTag", "/SimplePaint"},
1353 { "/Color", QVariantHash({
1354 {"/Type", 1},
1355 {"/Values", QVariantList({1.0, c.redF(), c.greenF(), c.blueF()})
1356 }})}
1357 });
1358 } else {
1359 styleDict["/FillFlag"] = false;
1360 }
1361 }
1362 if (el.hasAttribute("stroke")) {
1363 if (el.attribute("stroke") != "none" && el.attribute("stroke-width").toDouble() != 0) {
1364 QColor c = QColor(el.attribute("stroke"));
1365
1366 styleDict["/StrokeFlag"] = true;
1367 styleDict["/StrokeColor"] = QVariantHash({ {"/StreamTag", "/SimplePaint"},
1368 { "/Color", QVariantHash({
1369 {"/Type", 1},
1370 {"/Values", QVariantList({1.0, c.redF(), c.greenF(), c.blueF()})
1371 }})}
1372 });
1373 } else {
1374 styleDict["/StrokeFlag"] = false;
1375 }
1376 }
1377 if (el.hasAttribute("stroke-linejoin")) {
1378 QString val = el.attribute("stroke-linejoin");
1379 if (val == "miter") {
1380 styleDict["/LineJoin"] = 0;
1381 } else if (val == "round") {
1382 styleDict["/LineJoin"] = 1;
1383 } else if (val == "bevel") {
1384 styleDict["/LineJoin"] = 2;
1385 }
1386 }
1387 if (el.hasAttribute("stroke-linecap")) {
1388 QString val = el.attribute("stroke-linecap");
1389 if (val == "butt") {
1390 styleDict["/LineCap"] = 0;
1391 } else if (val == "round") {
1392 styleDict["/LineCap"] = 1;
1393 } else if (val == "square") {
1394 styleDict["/LineCap"] = 2;
1395 }
1396 }
1397 if (el.hasAttribute("stroke-width") && el.attribute("stroke-width").toDouble() != 0) {
1398 styleDict["/LineWidth"] = el.attribute("stroke-width").toDouble();
1399 }
1400}