Пример #1
0
        internal IVisio.Page Draw(FormRenderingContext ctx)
        {
            var r          = new InteractiveRenderer(ctx.Document);
            var page_cells = new Pages.PageCells();

            this.VisioPage = r.CreatePage(this);
            ctx.Page       = this.VisioPage;

            var titleblock = new TextBlock(new Drawing.Size(7.5, 0.5), this.Title);

            int _fontid = ctx.GetFontID(this.DefaultFont);

            titleblock.TextBlockCells.VerticalAlign   = 0;
            titleblock.ParagraphCells.HorizontalAlign = 0;
            titleblock.FormatCells.LineWeight         = 0;
            titleblock.FormatCells.LinePattern        = 0;
            titleblock.CharacterCells.Font            = _fontid;
            titleblock.CharacterCells.Size            = get_pt_string(this.TitleTextSize);



            // Draw the shapes
            var titleshape = r.AddShape(titleblock);

            r.Linefeed();

            double body_height = r.GetDistanceToBottomMargin();
            var    bodyblock   = new TextBlock(new Drawing.Size(7.5, body_height), this.Body);

            bodyblock.ParagraphCells.HorizontalAlign = 0;
            bodyblock.ParagraphCells.SpacingAfter    = get_pt_string(this.BodyParaSpacingAfter);
            bodyblock.CharacterCells.Font            = _fontid;
            bodyblock.CharacterCells.Size            = get_pt_string(this.BodyTextSize);
            bodyblock.FormatCells.LineWeight         = 0;
            bodyblock.FormatCells.LinePattern        = 0;
            bodyblock.TextBlockCells.VerticalAlign   = 0;
            bodyblock.FormatCells.LineWeight         = 0;
            bodyblock.FormatCells.LinePattern        = 0;

            var bodyshape = r.AddShape(bodyblock);

            r.Linefeed();

            r.Finish();
            return(this.VisioPage);
        }
        internal IVisio.Page Draw(FormRenderingContext ctx)
        {
            var r = new InteractiveRenderer(ctx.Document);
            var page_cells = new Pages.PageCells();
            this.VisioPage = r.CreatePage(this);
            ctx.Page = this.VisioPage;

            var titleblock = new TextBlock(new Drawing.Size(7.5, 0.5), this.Title);

            int _fontid = ctx.GetFontID(this.DefaultFont);
            titleblock.TextBlockCells.VerticalAlign = 0;
            titleblock.ParagraphCells.HorizontalAlign = 0;
            titleblock.FormatCells.LineWeight = 0;
            titleblock.FormatCells.LinePattern = 0;
            titleblock.CharacterCells.Font = _fontid;
            titleblock.CharacterCells.Size = get_pt_string(this.TitleTextSize);



            // Draw the shapes
            var titleshape = r.AddShape(titleblock);
            r.Linefeed();

            double body_height = r.GetDistanceToBottomMargin();
            var bodyblock = new TextBlock(new Drawing.Size(7.5, body_height), this.Body);
            bodyblock.ParagraphCells.HorizontalAlign = 0;
            bodyblock.ParagraphCells.SpacingAfter = get_pt_string(this.BodyParaSpacingAfter);
            bodyblock.CharacterCells.Font = _fontid;
            bodyblock.CharacterCells.Size = get_pt_string(this.BodyTextSize);
            bodyblock.FormatCells.LineWeight = 0;
            bodyblock.FormatCells.LinePattern = 0;
            bodyblock.TextBlockCells.VerticalAlign = 0;
            bodyblock.FormatCells.LineWeight = 0;
            bodyblock.FormatCells.LinePattern = 0;

            var bodyshape = r.AddShape(bodyblock);
            r.Linefeed();

            r.Finish();
            return this.VisioPage;
        }