Exemple #1
0
        /**
         * render a foreign object area
         */

        public void RenderForeignObjectArea(ForeignObjectArea area)
        {
            // if necessary need to scale and align the content
            this.currentXPosition = this.currentXPosition + area.getXOffset();
            // TODO: why was this here? this.currentYPosition = this.currentYPosition;
            switch (area.getAlign())
            {
            case TextAlign.START:
                break;

            case TextAlign.END:
                break;

            case TextAlign.CENTER:
            case TextAlign.JUSTIFY:
                break;
            }
            switch (area.getVerticalAlign())
            {
            case VerticalAlign.BASELINE:
                break;

            case VerticalAlign.MIDDLE:
                break;

            case VerticalAlign.SUB:
                break;

            case VerticalAlign.SUPER:
                break;

            case VerticalAlign.TEXT_TOP:
                break;

            case VerticalAlign.TEXT_BOTTOM:
                break;

            case VerticalAlign.TOP:
                break;

            case VerticalAlign.BOTTOM:
                break;
            }
            CloseText();

            // in general the content will not be text
            currentStream.EndTextObject();
            // align and scale
            currentStream.SaveGraphicsState();
            switch (area.scalingMethod())
            {
            case Scaling.UNIFORM:
                break;

            case Scaling.NON_UNIFORM:
                break;
            }
            // if the overflow is auto (default), scroll or visible
            // then the contents should not be clipped, since this
            // is considered a printing medium.
            switch (area.getOverflow())
            {
            case Overflow.VISIBLE:
            case Overflow.SCROLL:
            case Overflow.AUTO:
                break;

            case Overflow.HIDDEN:
                break;
            }

            area.getObject().render(this);
            currentStream.RestoreGraphicsState();
            currentStream.BeginTextObject();
            this.currentXPosition += area.getEffectiveWidth();
            // this.currentYPosition -= area.getEffectiveHeight();
        }