This commit is contained in:
Jindra Petk
2014-02-23 14:18:34 +01:00
3 changed files with 11 additions and 3 deletions

View File

@@ -167,7 +167,11 @@ public class BitmapExporter extends ShapeExporterBase implements IShapeExporter
@Override
public void beginFill(RGB color) {
finalizePath();
fillPaint = color.toColor();
if (color == null) {
fillPaint = defaultColor;
} else {
fillPaint = color.toColor();
}
}
@Override

View File

@@ -28,6 +28,7 @@ import com.jpexs.decompiler.flash.types.RGBA;
import com.jpexs.decompiler.flash.types.SHAPE;
import com.jpexs.helpers.Helper;
import com.jpexs.helpers.SerializableImage;
import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -125,6 +126,9 @@ public class SVGShapeExporter extends DefaultSVGShapeExporter {
@Override
public void beginFill(RGB color) {
if (color == null) {
color = new RGB(Color.BLACK);
}
finalizePath();
path.setAttribute("stroke", "none");
path.setAttribute("fill", color.toHexRGB());

View File

@@ -302,8 +302,8 @@ public abstract class ShapeExporterBase implements IShapeExporter {
}
} catch (Exception ex) {
// Font shapes define no fillstyles per se, but do reference fillstyle index 1,
// which represents the font color. We just report solid black in this case.
beginFill(new RGB(Color.BLACK));
// which represents the font color. We just report null in this case.
beginFill(null);
}
}
if (!pos.equals(e.getFrom())) {