// get TEMPFAC type from subvals or Arg.TEMPFAC in case user Adds
// reference annotations
+ String tftString = ArgParser
+ .getFromSubValArgOrPrefWithSubstitutions(argParser, avm,
+ Arg.TEMPFAC, Position.AFTER, av, subVals, null,
+ null, null);
+ boolean notempfac = ArgParser.getBoolFromSubValOrArg(avm,
+ Arg.NOTEMPFAC, subVals);
+ TFType tft = notempfac ? null : TFType.DEFAULT;
+ /*
String tftString = subVals.get("tempfac");
- TFType tft = avm.getBoolean(Arg.NOTEMPFAC) ? null
- : TFType.DEFAULT;
ArgValue tftAv = getArgAssociatedWithStructure(Arg.TEMPFAC, avm,
af, structureFilepath);
if (tftString == null && tftAv != null)
{
tftString = tftAv.getSubVals().getContent();
}
- if (tftString != null)
+ */
+ if (tftString != null && !notempfac)
{
// get kind of temperature factor annotation
try
}
}
- boolean addTempFac = tft != null
- || Cache.getDefault("ADD_TEMPFACT_ANN", false);
+ boolean addTempFac = notempfac ? false
+ : ((tft != null)
+ || Cache.getDefault("ADD_TEMPFACT_ANN", false));
// TODO use ssFromStructure
StructureChooser.openStructureFileForSequence(null, null, ap, seq,
if (renderer == null)
renderer = "text";
String type = "png"; // default
+
+ float bitmapscale = 0.0f;
+ int bitmapwidth = 0;
+ int bitmapheight = 0;
+ String scale = ArgParser.getValueFromSubValOrArg(avm, av, Arg.SCALE,
+ subVal);
+ if (scale != null)
+ {
+ try
+ {
+ bitmapscale = Float.parseFloat(scale);
+ } catch (NumberFormatException e)
+ {
+ Console.warn("Did not understand scale '" + scale
+ + "', won't be used.");
+ }
+ }
+ String width = ArgParser.getValueFromSubValOrArg(avm, av, Arg.WIDTH,
+ subVal);
+ if (width != null)
+ {
+ try
+ {
+ bitmapwidth = Integer.parseInt(width);
+ } catch (NumberFormatException e)
+ {
+ Console.warn("Did not understand width '" + width
+ + "', won't be used.");
+ }
+ }
+ String height = ArgParser.getValueFromSubValOrArg(avm, av,
+ Arg.HEIGHT, subVal);
+ if (height != null)
+ {
+ try
+ {
+ bitmapheight = Integer.parseInt(height);
+ } catch (NumberFormatException e)
+ {
+ Console.warn("Did not understand height '" + height
+ + "', won't be used.");
+ }
+ }
+
type = ArgParser.getValueFromSubValOrArg(avm, av, Arg.TYPE, subVal);
if (type == null && fileName != null)
{
case "png":
Console.debug("Outputting type '" + type + "' to " + fileName);
- af.createPNG(file);
+ af.createPNG(file, null, bitmapscale, bitmapwidth, bitmapheight);
break;
case "html":