protected List<Area> layoutISDInstance(Element e, LayoutState ls) { List<Area> areas = new java.util.ArrayList<Area>(); try { double begin = Double.parseDouble(e.getAttribute("begin")); double end = Double.parseDouble(e.getAttribute("end")); Extent cellResolution = parseCellResolution(Documents.getAttribute(e, ttpCellResolutionAttrName, null)); if (cellResolution == null) cellResolution = defaults.getCellResolution(); ls.pushCanvas(e, begin, end, cellResolution); Extent extent = ls.getExternalExtent(); double w = extent.getWidth(); double h = extent.getHeight(); boolean clip = ls.getExternalOverflow().clips(); ls.pushViewport(e, w, h, clip); WritingMode wm = ls.getExternalWritingMode(); TransformMatrix ctm = ls.getExternalTransform(); ls.pushReference(e, 0, 0, w, h, wm, ctm); for (Element c : getChildElements(e)) { if (isElement(c, isdRegionElementName)) layoutRegion(c, ls); else if (isElement(c, isdComputedStyleSetElementName)) ls.saveStyles(c); } ls.pop(); ls.pop(); areas.add(ls.pop()); } catch (NumberFormatException x) { } return areas; }
protected static boolean isElement(Element e, QName qn) { return Documents.isElement(e, qn); }
protected static List<Element> getChildElements(Element e) { return Documents.getChildElements(e); }