@@ -376,7 +376,7 @@ protected void writeStates(List<DataNode> dataNodes, Element root) throws Conver
376376 setAttr ("State.Graphics" , "Height" , gfx , Double .toString (state .getHeight ()));
377377 // state does not have custom font properties in GPML2013a
378378 // z-order for state is not written to GPML2013a
379- setAttr ("State.Graphics" , "FillColor" , gfx , ColorUtils .colorToHex (state .getFillColor (), false ));
379+ setAttr ("State.Graphics" , "FillColor" , gfx , ColorUtils .colorToHex2013 (state .getFillColor (), false ));
380380 writeShapeStyleProperty (state , gfx );
381381 writeColor (state , gfx );
382382 // writes xref (write even if empty)
@@ -620,7 +620,6 @@ protected void writeShapes(List<Shape> shapes, Element root) throws ConverterExc
620620 writeShapedElement (shape , shp );
621621 writeGroupRef (shape .getGroupRef (), shp );
622622 Element gfx = shp .getChild ("Graphics" , shp .getNamespace ());
623- setAttr ("Shape.Graphics" , "FillColor" , gfx , ColorUtils .colorToHex (shape .getFillColor (), false ));
624623 setAttr ("Shape.Graphics" , "Rotation" , gfx , Double .toString (shape .getRotation ()));
625624 if (shp != null ) {
626625 root .addContent (shp );
@@ -900,7 +899,7 @@ protected void writeShapedElement(ShapedElement shapedElement, Element se) throw
900899 writeRectProperty (shapedElement , gfx );
901900 // writes z-order and fill color (separately to preserve GPML2013 order)
902901 setAttr (base + ".Graphics" , "ZOrder" , gfx , String .valueOf (shapedElement .getZOrder ()));
903- setAttr (base + ".Graphics" , "FillColor" , gfx , ColorUtils .colorToHex (shapedElement .getFillColor (), false ));
902+ setAttr (base + ".Graphics" , "FillColor" , gfx , ColorUtils .colorToHex2013 (shapedElement .getFillColor (), false ));
904903 // writes font properties
905904 writeFontProperty (shapedElement , gfx );
906905 // writes rest of shape style properties
@@ -1060,8 +1059,7 @@ protected void writeRectProperty(ShapedElement shapedElement, Element gfx) throw
10601059 */
10611060 protected void writeColor (ShapedElement shapedElement , Element gfx ) throws ConverterException {
10621061 String base = ((Element ) gfx .getParent ()).getName ();
1063- setAttr (base + ".Graphics" , "Color" , gfx , ColorUtils .colorToHex (shapedElement .getTextColor (), false ));
1064-
1062+ setAttr (base + ".Graphics" , "Color" , gfx , ColorUtils .colorToHex2013 (shapedElement .getTextColor (), false ));
10651063 }
10661064
10671065 /**
@@ -1148,7 +1146,6 @@ protected void writeLineStyleProperty(LineElement lineElement, Element gfx) thro
11481146 setAttr (base + ".Graphics" , "LineStyle" , gfx , lineStyleStr );
11491147 }
11501148 setAttr (base + ".Graphics" , "LineThickness" , gfx , String .valueOf (lineElement .getLineWidth ()));
1151- setAttr (base + ".Graphics" , "Color" , gfx , ColorUtils .colorToHex (lineElement .getLineColor (), false ));
1149+ setAttr (base + ".Graphics" , "Color" , gfx , ColorUtils .colorToHex2013 (lineElement .getLineColor (), false ));
11521150 }
1153-
11541151}
0 commit comments