VegaRise.NET
Back to DOM

Effect3DClass

Definition

Namespace
DOM.Elements.Graphics.Effects
Assembly
DOM.dll

Represents a 3D effect applied to an object or text in a Word document.

Remarks

describes an extruded, beveled, and optionally contoured 3D appearance for shapes and text. It is the effect-side counterpart of : effect-side configuration is used by, while shape-side configuration is used by a shape's 3D type. Both are processed by the same rendering pipeline. Effect3D Shape3DType TextEffect.Effect3D A default preset is available via, providing a circular bevel on the top and bottom, a 1 pt extrusion, a 1 pt contour, and theme-driven colors. DefaultEffect

Examples

csharp
1// 1. Use the default preset
2var effect = Effect3D.DefaultEffect;
3
csharp
1// 2. Custom extrusion with top and bottom bevels
2var effect = new Effect3D
3{
4 ExtrusionHeight = new DocumentUnit(12, Units.pt),
5 ContourWidth = new DocumentUnit(2, Units.pt),
6 PresetMaterialType = PresetMaterialTypeValues.Metal,
7 ExtrusionColor = Color.Silver,
8 ContourColor = Color.Black,
9 BevelTop = new Bevel
10 {
11 Width = new DocumentUnit(4, Units.pt),
12 Height = new DocumentUnit(2, Units.pt),
13 PresetProfileType = BevelPresetTypeValues.Slope
14 },
15 BevelBottom = new Bevel
16 {
17 Width = new DocumentUnit(2, Units.pt),
18 Height = new DocumentUnit(4, Units.pt),
19 PresetProfileType = BevelPresetTypeValues.ArtDeco
20 }
21};
22
csharp
1// 3. Attach a 3D effect to a text run
2var style = new TextStyle
3{
4 Font = new Font { Latin = new FontPart { FontName = "Arial Black", Size = 48.0 } },
5 TextEffect = new TextEffect
6 {
7 Effect3D = new Effect3D
8 {
9 ExtrusionHeight = new DocumentUnit(8, Units.pt),
10 PresetMaterialType = PresetMaterialTypeValues.Metal,
11 ExtrusionColor = Color.Gold
12 }
13 }
14};
15
csharp
1// 4. Extrusion without a contour
2var effect = new Effect3D
3{
4 ExtrusionHeight = new DocumentUnit(6, Units.pt),
5 ContourWidth = new DocumentUnit(0, Units.pt),
6 ExtrusionColor = Color.DarkGray
7};
8
csharp
1// 5. Matte material with a single top bevel
2var effect = new Effect3D
3{
4 ExtrusionHeight = new DocumentUnit(10, Units.pt),
5 PresetMaterialType = PresetMaterialTypeValues.Matte,
6 BevelTop = new Bevel
7 {
8 Width = new DocumentUnit(6, Units.pt),
9 Height = new DocumentUnit(3, Units.pt),
10 PresetProfileType = BevelPresetTypeValues.Circle
11 }
12};
13

Constructors

Effect3D()

Creates an empty 3D effect instance. All properties default to their type defaults and must be set explicitly by the caller.

Properties

BevelBottomBevel

Gets or sets the bevel effect applied to the bottom of the object or text.

BevelTopBevel

Gets or sets the bevel effect applied to the top of the object or text.

ContourColorColor

Gets or sets the color of the contour (outline) applied around the 3D object.

ContourWidthDocumentUnit

Gets or sets the width of the contour (outline) applied around the 3D shape.

The width is specified in points by convention, but any supported unit is accepted.

ExtrusionColorColor

Gets or sets the color of the extruded faces of the 3D object.

ExtrusionHeightDocumentUnit

Gets or sets the height of the extrusion (depth of the 3D effect).

The height is specified in points by convention, but any supported unit is accepted.

PresetMaterialTypePresetMaterialTypeValues

Gets or sets the preset material type for the 3D effect.

Fields

DefaultEffect

A static, pre-configured 3D effect instance suitable for typical shapes and text.

The default sets a circular top bevel (width 2 pt, height 0 pt), a circular bottom bevel (width 0 pt, height 2 pt), a 1 pt extrusion, a 1 pt contour, and uses and for the extrusion and contour colors. Color.AdditionalTextColor Color.ExtraSchemeColor1

VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.