コード例 #1
0
ファイル: LinkSet.cs プロジェクト: nholik/Fo.Net
 public void applyAreaContainerOffsets(AreaContainer ac, Area area)
 {
     int height = area.getAbsoluteHeight();
     BlockArea ba = (BlockArea)area;
     foreach (LinkedRectangle r in rects)
     {
         r.setX(r.getX() + ac.getXPosition() + area.getTableCellXOffset());
         r.setY(ac.GetYPosition() - height + (maxY - r.getY()) - ba.getHalfLeading());
     }
 }
コード例 #2
0
        public void applyAreaContainerOffsets(AreaContainer ac, Area area)
        {
            int       height = area.getAbsoluteHeight();
            BlockArea ba     = (BlockArea)area;

            foreach (LinkedRectangle r in rects)
            {
                r.setX(r.getX() + ac.getXPosition() + area.getTableCellXOffset());
                r.setY(ac.GetYPosition() - height + (maxY - r.getY()) - ba.getHalfLeading());
            }
        }
コード例 #3
0
        public bool needsFootnoteAdjusting()
        {
            footnoteYPosition = footnoteReferenceArea.GetYPosition();
            switch (footnoteState)
            {
            case 0:
                resetHeights();
                if (footnoteReferenceArea.GetHeight() > 0 &&
                    mainYPosition + mainReferenceArea.GetHeight()
                    > footnoteYPosition)
                {
                    return(true);
                }
                break;

            case 1:
                break;
            }
            return(false);
        }
コード例 #4
0
ファイル: PdfRenderer.cs プロジェクト: nholik/Fo.Net
        public void RenderAreaContainer(AreaContainer area) {
            int saveY = this.currentYPosition;
            int saveX = this.currentAreaContainerXPosition;

            if (area.getPosition() == Position.ABSOLUTE) {
                // XPosition and YPosition give the content rectangle position
                this.currentYPosition = area.GetYPosition();
                this.currentAreaContainerXPosition = area.getXPosition();
            }
            else if (area.getPosition() == Position.RELATIVE) {
                this.currentYPosition -= area.GetYPosition();
                this.currentAreaContainerXPosition += area.getXPosition();
            }
            else if (area.getPosition() == Position.STATIC) {
                this.currentYPosition -= area.getPaddingTop()
                    + area.getBorderTopWidth();
            }

            this.currentXPosition = this.currentAreaContainerXPosition;
            DoFrame(area);

            foreach (Box b in area.getChildren()) {
                b.render(this);
            }

            // Restore previous origin
            this.currentYPosition = saveY;
            this.currentAreaContainerXPosition = saveX;
            if (area.getPosition() == Position.STATIC) {
                this.currentYPosition -= area.GetHeight();
            }
        }