nofill parameter for shape import (repace)

This commit is contained in:
honfika@gmail.com
2015-07-22 15:01:30 +02:00
parent 197a9770cb
commit f7dd7f0ff5
2 changed files with 20 additions and 5 deletions

View File

@@ -386,8 +386,9 @@ public class CommandLineArgumentParser {
}
if (filter == null || filter.equals("replace")) {
out.println(" " + (cnt++) + ") -replace <infile> <outfile> (<characterId1>|<scriptName1>) <importDataFile1> ([<format1>][<methodBodyIndex1>]) [(<characterId2>|<scriptName2>) <importDataFile2> ([<format2>][<methodBodyIndex2>])]...");
out.println(" " + (cnt++) + ") -replace <infile> <outfile> (<characterId1>|<scriptName1>) <importDataFile1> [nofill] ([<format1>][<methodBodyIndex1>]) [(<characterId2>|<scriptName2>) <importDataFile2> [nofill] ([<format2>][<methodBodyIndex2>])]...");
out.println(" ...replaces the data of the specified BinaryData, Image, Shape, Text, DefineSound tag or Script");
out.println(" ...nofill parameter can be specified only for shape replace");
out.println(" ...<format> parameter can be specified for Image and Shape tags");
out.println(" ...valid formats: lossless, lossless2, jpeg2, jpeg3, jpeg4");
out.println(" ...<methodBodyIndexN> parameter should be specified if and only if the imported entity is an AS3 P-Code");
@@ -1911,9 +1912,14 @@ public class CommandLineArgumentParser {
ImageTag imageTag = (ImageTag) characterTag;
new ImageImporter().importImage(imageTag, data, format);
} else if (characterTag instanceof ShapeTag) {
boolean fill = true;
if (!args.isEmpty() && args.peek().equals("nofill")) {
args.pop();
fill = false;
}
int format = parseImageFormat(args);
ShapeTag shapeTag = (ShapeTag) characterTag;
new ShapeImporter().importImage(shapeTag, data, format);
new ShapeImporter().importImage(shapeTag, data, format, fill);
} else if (characterTag instanceof TextTag) {
TextTag textTag = (TextTag) characterTag;
new TextImporter(new MissingCharacterHandler(), new TextImportErrorHandler() {