Пример #1
0
 protected void layoutRegion(Element e, LayoutState ls) {
   Extent extent = ls.getExtent(e);
   double w = extent.getWidth();
   double h = extent.getHeight();
   Point origin = ls.getPosition(e, extent);
   double x = origin.getX();
   double y = origin.getY();
   boolean clip = ls.getOverflow(e).clips();
   ls.pushViewport(e, w, h, clip);
   WritingMode wm = ls.getWritingMode(e);
   TransformMatrix ctm = ls.getTransform(e);
   ls.pushReference(e, x, y, w, h, wm, ctm);
   for (Element c : getChildElements(e)) {
     if (isElement(c, ttBodyElementName)) layoutBody(c, ls);
   }
   AreaNode r = ls.peek();
   if (r instanceof ReferenceArea) alignBlockAreas((ReferenceArea) r, ls.getReferenceAlignment());
   ls.pop();
   ls.pop();
 }
Пример #2
0
 public double getY() {
   return origin.getY();
 }