public void RenderLineArea(LineArea area) { int rx = this.currentAreaContainerXPosition + area.getStartIndent(); int ry = this.currentYPosition; int w = area.getContentWidth(); int h = area.GetHeight(); this.currentYPosition -= area.getPlacementOffset(); this.currentXPosition = rx; int bl = this.currentYPosition; foreach (Box b in area.getChildren()) { if (b is InlineArea) { InlineArea ia = (InlineArea)b; this.currentYPosition = ry - ia.getYOffset(); } else { this.currentYPosition = ry - area.getPlacementOffset(); } b.render(this); } this.currentYPosition = ry - h; this.currentXPosition = rx; }
public LinkedRectangle(Rectangle link, LineArea lineArea, InlineArea inlineArea) { this.link = link; this.lineArea = lineArea; this.inlineArea = inlineArea; }
public void addRect(Rectangle r, LineArea lineArea, InlineArea inlineArea) { LinkedRectangle linkedRectangle = new LinkedRectangle(r, lineArea, inlineArea); linkedRectangle.setY(this.yoffset); if (this.yoffset > maxY) { maxY = this.yoffset; } rects.Add(linkedRectangle); }
public void addInlineArea(InlineArea box, LinkSet ls) { addPending(); addChild(box); if (ls != null) { Rectangle lr = new Rectangle(finalWidth, 0, box.getContentWidth(), box.getContentHeight()); ls.addRect(lr, this, box); } prev = TEXT; finalWidth += box.getContentWidth(); }
public void verticalAlign() { int superHeight = -this.placementOffset; int maxHeight = this.allocationHeight; foreach (Box b in children) { if (b is InlineArea) { InlineArea ia = (InlineArea)b; if (ia is WordArea) { ia.setYOffset(placementOffset); } if (ia.GetHeight() > maxHeight) { maxHeight = ia.GetHeight(); } switch (ia.getVerticalAlign()) { default: break; case VerticalAlign.SUPER: { int fh = fontState.Ascender; ia.setYOffset((int)(placementOffset - (2 * fh / 3.0))); } break; case VerticalAlign.SUB: { int fh = fontState.Ascender; ia.setYOffset((int)(placementOffset + (2 * fh / 3.0))); } break; } } else { } } this.allocationHeight = maxHeight; }
public void setLineArea(InlineArea inlineArea) { this.inlineArea = inlineArea; }
public LinkedRectangle(LinkedRectangle lr) { this.link = lr.getRectangle(); this.lineArea = lr.getLineArea(); this.inlineArea = lr.getInlineArea(); }