Text3DEffect.cs
//
// This code is part of Document Solutions for Word demos.
// Copyright (c) MESCIUS inc. All rights reserved.
//
using System;
using System.IO;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using GrapeCity.Documents.Word;

namespace DsWordWeb.Demos
{
    // This example shows how to add a 3D effect to a text.
    public class Text3DEffect
    {
        public GcWordDocument CreateDocx()
        {
            var doc = new GcWordDocument();

            Paragraph paragraph = doc.Body.Paragraphs.Add();
            Run run = paragraph.GetRange().Runs.Add("3D effects");

            GrapeCity.Documents.Word.Font font = run.Font;
            font.Size = 72f;
            font.Bold = true;
            font.Color.ThemeColor = ThemeColorId.Accent3;
            font.Line.Fill.Type = FillType.NoFill;

            // apply 3D effect
            ThreeDFormat threeD = font.Effects.ThreeDFormat;
            threeD.Material = MaterialType.Matte;
            threeD.Depth.Width = 4.5f;
            threeD.TopBevel.Type = BevelType.Angle;
            threeD.TopBevel.Width = 5f;
            threeD.TopBevel.Height = 1f;

            // Done:
            return doc;
        }
    }
}