parameter is used for FO output (where SVG now is the default graphics format for callouts).
String graphicsPath = "";
String graphicsExt = "";
int graphicsMax = 0;
+ String iconSize = "";
- public FormatGraphicCallout(NamePool nPool, String path, String ext, int max, boolean fo) {
+ public FormatGraphicCallout(NamePool nPool, String path, String ext, int max, String size, boolean fo) {
super(nPool, fo);
graphicsPath = path;
graphicsExt = ext;
graphicsMax = max;
+ iconSize = size;
}
public void formatCallout(Emitter rtfEmitter,
imgAttr.addAttribute("", "", "src", "CDATA", "url(" +
graphicsPath + num + graphicsExt + ")");
imgAttr.addAttribute("", "", "id", "CDATA", id);
+ imgAttr.addAttribute("", "", "content-width", "CDATA", iconSize);
+ imgAttr.addAttribute("", "", "width", "CDATA", iconSize);
// HTML
} else {
private static String graphicsExt = null;
/** The largest callout number that can be represented graphically. */
private static int graphicsMax = 10;
+ /** The size of the callout icon. */
+ private static String iconSize = null;
/** The FormatCallout object to use for formatting callouts. */
private static FormatCallout fCallout = null;
int unicodeStart = 49;
int unicodeMax = 0;
-
+
String unicodeFont = "";
// Hardcoded defaults
graphicsPath = null;
graphicsExt = null;
graphicsMax = 0;
+ iconSize = "7pt";
foStylesheet = false;
calloutsSetup = true;
graphicsMax = 0;
}
+ // Get the callout icon size
+ varString = getVariable(context, "callout.icon.size");
+ iconSize = varString;
+
fCallout = new FormatGraphicCallout(namePool,
graphicsPath,
graphicsExt,
graphicsMax,
+ iconSize,
foStylesheet);
} else if (useUnicode) {
// Get the starting character
String graphicsPath = "";
String graphicsExt = "";
int graphicsMax = 0;
+ String iconSize = "";
- public FormatGraphicCallout(String path, String ext, int max, boolean fo) {
+ public FormatGraphicCallout(String path, String ext, int max, String size, boolean fo) {
graphicsPath = path;
graphicsExt = ext;
graphicsMax = max;
stylesheetFO = fo;
+ iconSize = size;
+
+ //System.out.println("Size: " + size);
+
}
public void formatCallout(DOMBuilder rtf,
imgAttr.addAttribute("", "src", "src", "CDATA", "url(" +
graphicsPath + num + graphicsExt + ")");
imgAttr.addAttribute("", "id", "id", "ID", id);
+ imgAttr.addAttribute("", "content-width", "content-width", "CDATA", iconSize);
+ imgAttr.addAttribute("", "width", "width", "CDATA", iconSize);
} else {
ns = "";
private String graphicsExt = null;
/** The largest callout number that can be represented graphically. */
private int graphicsMax = 10;
+ /** The size of the callout icon. */
+ private static String iconSize = null;
/** Should graphic callouts use fo:external-graphics or imgs. */
private boolean graphicsFO = false;
String gPath = Params.getString(context, "callout.graphics.path");
String gExt = Params.getString(context, "callout.graphics.extension");
int gMax = Params.getInt(context, "callout.graphics.number.limit");
+ String gSize = Params.getString(context, "callout.icon.size");
return insertGraphicCallouts(areaspecNodeSet, xalanNI, defaultColumn,
- gPath, gExt, gMax, useFO);
+ gPath, gExt, gMax, gSize, useFO);
} else if (Params.getBoolean(context, "callout.unicode")) {
int uStart = Params.getInt(context, "callout.unicode.start.character");
String gPath,
String gExt,
int gMax,
+ String gSize,
boolean useFO) {
- FormatGraphicCallout fgc = new FormatGraphicCallout(gPath,gExt,gMax,useFO);
+ FormatGraphicCallout fgc = new FormatGraphicCallout(gPath,gExt,gMax, gSize, useFO);
return insertCallouts(areaspecNodeSet, xalanNI, defaultColumn, fgc);
}