Beispiel #1
0
        private void DrawText(FixedContentEditor editor)
        {
            double currentTopOffset = 500;

            currentTopOffset += defaultLineHeight * 2;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.Font = FontsRepository.Helvetica;
                editor.DrawText("A wizard's job is to vex ");
                using (editor.SaveGraphicProperties())
                {
                    editor.GraphicProperties.FillColor = new RgbColor(255, 146, 208, 80);
                    editor.DrawText("chumps");
                }
                editor.DrawText(" quickly in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.Font = FontsRepository.TimesRoman;
                editor.DrawText("A wizard's job is to vex chumps ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("quickly");
                }
                editor.DrawText(" in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.Font = FontsRepository.Courier;
                editor.DrawText("A ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.Font           = FontsRepository.CourierBoldOblique;
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("wizard's");
                }
                editor.DrawText(" job is to vex chumps quickly in fog.");
            }
        }
Beispiel #2
0
        private RadFixedDocument CreateDocument()
        {
            RadFixedDocument document = new RadFixedDocument();
            RadFixedPage     page     = document.Pages.AddPage();

            page.Size = new Size(600, 750);
            FixedContentEditor editor = new FixedContentEditor(page);

            editor.Position.Translate(defaultLeftIndent, 50);
            using (Stream stream = FileHelper.GetSampleResourceStream("pdfProcessingSilverlight.jpg"))
            {
                editor.DrawImage(stream);
            }
            double currentTopOffset = 110;

            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            editor.TextProperties.FontSize   = 14;
            editor.TextProperties.LineHeight = defaultLineHeight;
            double maxWidth = page.Size.Width - defaultLeftIndent * 2;

            this.DrawDescription(editor, maxWidth);

            currentTopOffset += defaultLineHeight * 5;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);

            using (editor.SaveGraphicProperties())
            {
                using (editor.SaveTextProperties())
                {
                    this.DrawFunnelFigure(editor);
                }
            }

            editor.Position.Translate(defaultLeftIndent * 4, page.Size.Height - 100);
            using (Stream stream = FileHelper.GetSampleResourceStream("telerik.jpg"))
            {
                editor.DrawImage(stream);
            }

            this.DrawText(editor);

            return(document);
        }
        private RadFixedDocument CreateDocument()
        {
            RadFixedDocument document = new RadFixedDocument();
            RadFixedPage page = document.Pages.AddPage();
            page.Size = new Size(600, 750);
            FixedContentEditor editor = new FixedContentEditor(page);
            editor.Position.Translate(defaultLeftIndent, 50);
            using (Stream stream = FileHelper.GetSampleResourceStream("pdfProcessingSilverlight.jpg"))
            {
                editor.DrawImage(stream);
            }
            double currentTopOffset = 110;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            editor.TextProperties.FontSize = 14;
            editor.TextProperties.LineHeight = defaultLineHeight;
            double maxWidth = page.Size.Width - defaultLeftIndent * 2;

            this.DrawDescription(editor, maxWidth);

            currentTopOffset += defaultLineHeight * 5;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);

            using (editor.SaveGraphicProperties())
            {
                using (editor.SaveTextProperties())
                {
                    this.DrawFunnelFigure(editor);
                }
            }

            editor.Position.Translate(defaultLeftIndent * 4, page.Size.Height - 100);
            using (Stream stream = FileHelper.GetSampleResourceStream("telerik.jpg"))
            {
                editor.DrawImage(stream);
            }

            this.DrawText(editor);

            return document;
        }
Beispiel #4
0
        public static RadFixedDocument CreatePagedDocument(FrameworkElement element, bool landscaped)
        {
            RadFixedDocument document   = new RadFixedDocument();
            double           pageMagins = 20;
            var numberOfPages           = landscaped ? Math.Ceiling(element.ActualHeight / element.ActualWidth * 1.4) : Math.Ceiling(element.ActualHeight / element.ActualWidth * .7);

            Size elementSizePerPage = new Size(element.ActualWidth, element.ActualHeight / numberOfPages);
            Size pageSize           = new Size(elementSizePerPage.Width + 2 * pageMagins, elementSizePerPage.Height + 2 * pageMagins);

            for (int pageIndex = 0; pageIndex < numberOfPages; pageIndex++)
            {
                RadFixedPage page = document.Pages.AddPage();
                page.Size = pageSize;

                FixedContentEditor editor = new FixedContentEditor(page, MatrixPosition.Default);
                editor.Position.Translate(pageMagins, pageMagins);

                // Draw dashed lines at the page clipping margins.
                using (editor.SaveGraphicProperties())
                {
                    editor.GraphicProperties.IsFilled        = false;
                    editor.GraphicProperties.IsStroked       = true;
                    editor.GraphicProperties.StrokeColor     = new RgbColor(200, 200, 200);
                    editor.GraphicProperties.StrokeDashArray = new double[] { 5, 5 };
                    editor.DrawRectangle(new Rect(0, 0, elementSizePerPage.Width, elementSizePerPage.Height));
                }

                // Clip and translate the element, so that it is positioned correctly on different pages.
                using (editor.PushClipping(new Rect(pageMagins, pageMagins, elementSizePerPage.Width, elementSizePerPage.Height)))
                {
                    editor.Position.Translate(0, -pageIndex * elementSizePerPage.Height);
                    ExportHelper.ExportToPdf(element, editor);
                }
            }

            return(document);
        }
Beispiel #5
0
        private void DrawFunnelFigure(FixedContentEditor editor)
        {
            editor.GraphicProperties.IsStroked = false;
            editor.GraphicProperties.FillColor = new RgbColor(231, 238, 247);
            editor.DrawEllipse(new Point(250, 70), 136, 48);

            editor.GraphicProperties.IsStroked       = true;
            editor.GraphicProperties.StrokeColor     = RgbColors.White;
            editor.GraphicProperties.StrokeThickness = 1;
            editor.GraphicProperties.FillColor       = new RgbColor(91, 155, 223);
            editor.DrawEllipse(new Point(289, 77), 48, 48);
            editor.TextProperties.TrySetFont(new FontFamily("Calibri"));
            editor.TextProperties.HorizontalAlignment = HorizontalTextAlignment.Center;
            editor.TextProperties.VerticalAlignment   = VerticalTextAlignment.Center;
            editor.TextProperties.TextBlockWidth      = 96;
            editor.TextProperties.TextBlockHeight     = 96;
            using (editor.SaveGraphicProperties())
            {
                editor.Position.Translate(291, 204);
                editor.GraphicProperties.FillColor = RgbColors.White;
                editor.DrawText("Fonts");
            }

            editor.Position.Translate(0, 0);
            editor.DrawEllipse(new Point(238, 274), 48, 48);
            using (editor.SaveGraphicProperties())
            {
                editor.Position.Translate(190, 226);
                editor.GraphicProperties.FillColor = RgbColors.White;
                editor.DrawText("Images");
            }

            editor.Position.Translate(0, 0);
            editor.DrawEllipse(new Point(307, 347), 48, 48);
            using (editor.SaveGraphicProperties())
            {
                editor.Position.Translate(259, 299);
                editor.GraphicProperties.FillColor = RgbColors.White;
                editor.DrawText("Shapes");
            }

            editor.Position.Translate(0, 0);
            PathGeometry arrow  = new PathGeometry();
            PathFigure   figure = arrow.Figures.AddPathFigure();

            figure.StartPoint = new Point(287, 422);
            figure.IsClosed   = true;
            figure.Segments.AddLineSegment(new Point(287, 438));
            figure.Segments.AddLineSegment(new Point(278, 438));
            figure.Segments.AddLineSegment(new Point(300, 454));
            figure.Segments.AddLineSegment(new Point(322, 438));
            figure.Segments.AddLineSegment(new Point(313, 438));
            figure.Segments.AddLineSegment(new Point(313, 422));

            editor.DrawPath(arrow);

            editor.GraphicProperties.FillColor       = new RgbColor(80, 255, 255, 255);
            editor.GraphicProperties.IsStroked       = true;
            editor.GraphicProperties.StrokeThickness = 1;
            editor.GraphicProperties.StrokeColor     = new RgbColor(91, 155, 223);

            PathGeometry funnel = new PathGeometry();

            funnel.FillRule   = FillRule.EvenOdd;
            figure            = funnel.Figures.AddPathFigure();
            figure.IsClosed   = true;
            figure.StartPoint = new Point(164, 245);
            figure.Segments.AddArcSegment(new Point(436, 245), 136, 48);
            figure.Segments.AddArcSegment(new Point(164, 245), 136, 48);

            figure            = funnel.Figures.AddPathFigure();
            figure.IsClosed   = true;
            figure.StartPoint = new Point(151, 245);
            figure.Segments.AddArcSegment(new Point(449, 245), 149, 61);
            figure.Segments.AddLineSegment(new Point(332, 415));
            figure.Segments.AddArcSegment(new Point(268, 415), 16, 4);

            editor.DrawPath(funnel);

            using (editor.SaveGraphicProperties())
            {
                using (editor.SaveTextProperties())
                {
                    editor.Position.Translate(164, 455);
                    editor.GraphicProperties.FillColor        = RgbColors.Black;
                    editor.TextProperties.HorizontalAlignment = HorizontalTextAlignment.Center;
                    editor.TextProperties.VerticalAlignment   = VerticalTextAlignment.Top;
                    editor.TextProperties.TextBlockWidth      = 272;
                    editor.TextProperties.FontSize            = 18;
                    editor.DrawText("PDF");
                }
            }
        }
Beispiel #6
0
        private void DrawText(FixedContentEditor editor, double maxWidth)
        {
            double currentTopOffset = 470;

            currentTopOffset += defaultLineHeight * 2;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            editor.TextProperties.FontSize = 11;
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Arial"));
                editor.DrawText("A wizard's job is to vex ");
                using (editor.SaveGraphicProperties())
                {
                    editor.GraphicProperties.FillColor = new RgbColor(255, 146, 208, 80);
                    editor.DrawText("chumps");
                }
                editor.DrawText(" quickly in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Trebuchet MS"));
                editor.DrawText("A wizard's job is to vex chumps ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("quickly");
                }
                editor.DrawText(" in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Algerian"));
                editor.DrawText("A ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("wizard's");
                }
                editor.DrawText(" job is to vex chumps quickly in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Lucida Calligraphy"));
                editor.DrawText("A wizard's job is to vex chumps quickly in fog.");
            }

            currentTopOffset += defaultLineHeight + 2;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Consolas"));
                editor.DrawText("A wizard's job is to vex chumps ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TrySetFont(new FontFamily("Consolas"), FontStyles.Normal, FontWeights.Bold);
                    editor.DrawText("quickly");
                }
                editor.DrawText(" in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Arial"));
                editor.DrawText("Ταχίστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.DrawText("В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            editor.TextProperties.TextBlockWidth = maxWidth;
            using (editor.BeginText())
            {
                editor.DrawText("El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío; añoraba a su querido cachorro.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);

            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Malgun Gothic"));
                editor.DrawText("키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.");
            }
        }
        private void DrawText(FixedContentEditor editor)
        {
            double currentTopOffset = 500;
            currentTopOffset += defaultLineHeight * 2;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.Font = FontsRepository.Helvetica;
                editor.DrawText("A wizard's job is to vex ");
                using (editor.SaveGraphicProperties())
                {
                    editor.GraphicProperties.FillColor = new RgbColor(255, 146, 208, 80);
                    editor.DrawText("chumps");
                }
                editor.DrawText(" quickly in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.Font = FontsRepository.TimesRoman;
                editor.DrawText("A wizard's job is to vex chumps ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("quickly");
                }
                editor.DrawText(" in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.Font = FontsRepository.Courier;
                editor.DrawText("A ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.Font = FontsRepository.CourierBoldOblique;
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("wizard's");
                }
                editor.DrawText(" job is to vex chumps quickly in fog.");
            }
        }
        private void DrawFunnelFigure(FixedContentEditor editor)
        {
            editor.GraphicProperties.IsStroked = false;
            editor.GraphicProperties.FillColor = new RgbColor(231, 238, 247);
            editor.DrawEllipse(new Point(250, 70), 136, 48);

            editor.GraphicProperties.IsStroked = true;
            editor.GraphicProperties.StrokeColor = RgbColors.White;
            editor.GraphicProperties.StrokeThickness = 1;
            editor.GraphicProperties.FillColor = new RgbColor(91, 155, 223);
            editor.DrawEllipse(new Point(289, 77), 48, 48);
            editor.TextProperties.Font = FontsRepository.Helvetica;
            editor.TextProperties.HorizontalAlignment = HorizontalTextAlignment.Center;
            editor.TextProperties.VerticalAlignment = VerticalTextAlignment.Center;
            editor.TextProperties.TextBlockWidth = 96;
            editor.TextProperties.TextBlockHeight = 96;
            using (editor.SaveGraphicProperties())
            {
                editor.Position.Translate(291, 229);
                editor.GraphicProperties.FillColor = RgbColors.White;
                editor.DrawText("Fonts");
            }

            editor.Position.Translate(0, 0);
            editor.DrawEllipse(new Point(238, 299), 48, 48);
            using (editor.SaveGraphicProperties())
            {
                editor.Position.Translate(190, 251);
                editor.GraphicProperties.FillColor = RgbColors.White;
                editor.DrawText("Images");
            }

            editor.Position.Translate(0, 0);
            editor.DrawEllipse(new Point(307, 372), 48, 48);
            using (editor.SaveGraphicProperties())
            {
                editor.Position.Translate(259, 324);
                editor.GraphicProperties.FillColor = RgbColors.White;
                editor.DrawText("Shapes");
            }

            editor.Position.Translate(0, 0);
            PathGeometry arrow = new PathGeometry();
            PathFigure figure = arrow.Figures.AddPathFigure();
            figure.StartPoint = new Point(287, 447);
            figure.IsClosed = true;
            figure.Segments.AddLineSegment(new Point(287, 463));
            figure.Segments.AddLineSegment(new Point(278, 463));
            figure.Segments.AddLineSegment(new Point(300, 479));
            figure.Segments.AddLineSegment(new Point(322, 463));
            figure.Segments.AddLineSegment(new Point(313, 463));
            figure.Segments.AddLineSegment(new Point(313, 447));

            editor.DrawPath(arrow);

            editor.GraphicProperties.FillColor = new RgbColor(80, 255, 255, 255);
            editor.GraphicProperties.IsStroked = true;
            editor.GraphicProperties.StrokeThickness = 1;
            editor.GraphicProperties.StrokeColor = new RgbColor(91, 155, 223);

            PathGeometry funnel = new PathGeometry();
            funnel.FillRule = FillRule.EvenOdd;
            figure = funnel.Figures.AddPathFigure();
            figure.IsClosed = true;
            figure.StartPoint = new Point(164, 270);
            figure.Segments.AddArcSegment(new Point(436, 270), 136, 48);
            figure.Segments.AddArcSegment(new Point(164, 270), 136, 48);

            figure = funnel.Figures.AddPathFigure();
            figure.IsClosed = true;
            figure.StartPoint = new Point(151, 270);
            figure.Segments.AddArcSegment(new Point(449, 270), 149, 61);
            figure.Segments.AddLineSegment(new Point(332, 440));
            figure.Segments.AddArcSegment(new Point(268, 440), 16, 4);

            editor.DrawPath(funnel);

            using (editor.SaveGraphicProperties())
            {
                using (editor.SaveTextProperties())
                {
                    editor.Position.Translate(164, 484);
                    editor.GraphicProperties.FillColor = RgbColors.Black;
                    editor.TextProperties.HorizontalAlignment = HorizontalTextAlignment.Center;
                    editor.TextProperties.VerticalAlignment = VerticalTextAlignment.Top;
                    editor.TextProperties.TextBlockWidth = 272;
                    editor.TextProperties.FontSize = 18;
                    editor.DrawText("PDF");
                }
            }
        }
Beispiel #9
0
        private static void DrawPageWithWidgets(RadFixedDocument document)
        {
            RadFixedPage page = document.Pages.AddPage();

            FixedContentEditor editor = new FixedContentEditor(page);

            using (editor.SaveGraphicProperties())
            {
                editor.GraphicProperties.IsFilled        = true;
                editor.GraphicProperties.IsStroked       = false;
                editor.GraphicProperties.StrokeThickness = 0;
                editor.GraphicProperties.FillColor       = new RgbColor(209, 178, 234);
                editor.DrawRectangle(new Rect(50, 50, editor.Root.Size.Width - 100, editor.Root.Size.Height - 100));
            }

            editor.Position.Translate(100, 100);
            Size widgetDimensions = new Size(200, 30);

            foreach (FormField field in document.AcroForm.FormFields)
            {
                switch (field.FieldType)
                {
                case FormFieldType.CheckBox:
                    CheckBoxField check = (CheckBoxField)field;
                    DrawNextWidgetWithDescription(editor, "CheckBox", (e) => e.DrawWidget(check, widgetDimensions));
                    break;

                case FormFieldType.ComboBox:
                    ComboBoxField combo = (ComboBoxField)field;
                    DrawNextWidgetWithDescription(editor, "ComboBox", (e) => e.DrawWidget(combo, widgetDimensions));
                    break;

                case FormFieldType.CombTextBox:
                    CombTextBoxField comb = (CombTextBoxField)field;
                    DrawNextWidgetWithDescription(editor, "Comb TextBox", (e) => e.DrawWidget(comb, widgetDimensions));
                    break;

                case FormFieldType.ListBox:
                    ListBoxField list = (ListBoxField)field;
                    DrawNextWidgetWithDescription(editor, "ListBox", (e) => e.DrawWidget(list, new Size(widgetDimensions.Width, widgetDimensions.Width)));
                    break;

                case FormFieldType.PushButton:
                    PushButtonField push = (PushButtonField)field;
                    DrawNextWidgetWithDescription(editor, "Button", (e) => e.DrawWidget(push, widgetDimensions));
                    break;

                case FormFieldType.RadioButton:
                    RadioButtonField radio = (RadioButtonField)field;
                    foreach (RadioOption option in radio.Options)
                    {
                        DrawNextWidgetWithDescription(editor, option.Value, (e) => e.DrawWidget(radio, option, widgetDimensions));
                    }
                    break;

                case FormFieldType.Signature:
                    SignatureField signature = (SignatureField)field;
                    DrawNextWidgetWithDescription(editor, "Signature", (e) => e.DrawWidget(signature, widgetDimensions));
                    break;

                case FormFieldType.TextBox:
                    TextBoxField textBox = (TextBoxField)field;
                    DrawNextWidgetWithDescription(editor, "TextBox", (e) => e.DrawWidget(textBox, widgetDimensions));
                    break;
                }
            }
        }
        private void DrawText(FixedContentEditor editor, double maxWidth)
        {
            double currentTopOffset = 470;
            currentTopOffset += defaultLineHeight * 2;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            editor.TextProperties.FontSize = 11;
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Arial"));
                editor.DrawText("A wizard's job is to vex ");
                using (editor.SaveGraphicProperties())
                {
                    editor.GraphicProperties.FillColor = new RgbColor(255, 146, 208, 80);
                    editor.DrawText("chumps");
                }
                editor.DrawText(" quickly in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Trebuchet MS"));
                editor.DrawText("A wizard's job is to vex chumps ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("quickly");
                }
                editor.DrawText(" in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Algerian"));
                editor.DrawText("A ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TextDecoration = Telerik.Windows.Documents.Fixed.Model.Text.TextDecorations.Underline;
                    editor.DrawText("wizard's");
                }
                editor.DrawText(" job is to vex chumps quickly in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Lucida Calligraphy"));
                editor.DrawText("A wizard's job is to vex chumps quickly in fog.");
            }

            currentTopOffset += defaultLineHeight + 2;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Consolas"));
                editor.DrawText("A wizard's job is to vex chumps ");
                using (editor.SaveTextProperties())
                {
                    editor.TextProperties.TrySetFont(new FontFamily("Consolas"), FontStyles.Normal, FontWeights.Bold);
                    editor.DrawText("quickly");
                }
                editor.DrawText(" in fog.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Arial"));
                editor.DrawText("Ταχίστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            using (editor.BeginText())
            {
                editor.DrawText("В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);
            editor.TextProperties.TextBlockWidth = maxWidth;
            using (editor.BeginText())
            {
                editor.DrawText("El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío; añoraba a su querido cachorro.");
            }

            currentTopOffset += defaultLineHeight;
            editor.Position.Translate(defaultLeftIndent, currentTopOffset);

            using (editor.BeginText())
            {
                editor.TextProperties.TrySetFont(new FontFamily("Malgun Gothic"));
                editor.DrawText("키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.");
            }
        }