Search Results for

    Show / Hide Table of Contents

    Class Effect3D

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

    Inheritance
    System.Object
    Effect3D
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class Effect3D : Object

    When an object or text in a Word document needs depth, Effect3D supplies the 3D treatment. It bundles the bevel, contour, extrusion, and material settings that give a flat element a raised, carved, or glossy appearance, which a developer attaches where a document element accepts a 3D effect.

    The quickest start is the static DefaultEffect, a predefined Effect3D ready to apply without setting anything. For a custom effect, construct one with new Effect3D() and configure its parts. BevelTop and BevelBottom take Bevel objects that shape the raised edges, ContourColor and ExtrusionColor (both Color) set the outline and depth colors, and PresetMaterialType chooses a surface finish from PresetMaterialTypeValues, such as matte or metallic.

    The depth measurements have paired getters and setters that work in a chosen unit. SetContourWidth and SetExtrusionHeight each take a value and a MeasurementUnit, while GetContourWidth and GetExtrusionHeight return the current value converted to a requested unit, so a developer can set the contour width in points and read it back in millimeters without doing the math. The ContourWidth and ExtrusionHeight properties hold the underlying double values directly when a unit conversion is not needed. Because all of these settings live on one effect object, the same Effect3D can be defined once and reused across several elements that should share the same look.

    var effect = new Effect3D();
    effect.PresetMaterialType = PresetMaterialTypeValues.Matte;
    effect.SetExtrusionHeight(6, MeasurementUnit.Point);

    The shadow text effect how-to applies a related depth effect, the glow text effect how-to covers another visual treatment, and the document element tutorial shows how effects attach to elements.

    Constructors

    Effect3D()

    Create a 3D effect instance.

    Declaration
    public Effect3D()

    Fields

    DefaultEffect

    Create a predefined 3D effect instance.

    Declaration
    public static Effect3D DefaultEffect
    Field Value
    Type Description
    Effect3D

    Properties

    BevelBottom

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

    Declaration
    public Bevel BevelBottom { get; set; }
    Property Value
    Type Description
    Bevel

    BevelTop

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

    Declaration
    public Bevel BevelTop { get; set; }
    Property Value
    Type Description
    Bevel

    ContourColor

    Gets or sets the color of the contour effect.

    Declaration
    public Color ContourColor { get; set; }
    Property Value
    Type Description
    Color

    ContourWidth

    Gets or sets the width of the contour effect.

    Declaration
    public double ContourWidth { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The width is specified in points (1/72 inch).

    ExtrusionColor

    Gets or sets the color of the extrusion effect.

    Declaration
    public Color ExtrusionColor { get; set; }
    Property Value
    Type Description
    Color

    ExtrusionHeight

    Gets or sets the height of the extrusion effect.

    Declaration
    public double ExtrusionHeight { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The height is specified in points (1/72 inch).

    PresetMaterialType

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

    Declaration
    public PresetMaterialTypeValues PresetMaterialType { get; set; }
    Property Value
    Type Description
    PresetMaterialTypeValues

    Methods

    GetContourWidth(MeasurementUnit)

    Gets the width of the contour effect in the specified measurement unit.

    Declaration
    public double GetContourWidth(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert the width to.

    Returns
    Type Description
    System.Double

    The width of the contour effect.

    GetExtrusionHeight(MeasurementUnit)

    Gets the height of the extrusion effect in the specified measurement unit.

    Declaration
    public double GetExtrusionHeight(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert the height to.

    Returns
    Type Description
    System.Double

    The height of the extrusion effect.

    SetContourWidth(Double, MeasurementUnit)

    Sets the width of the contour effect to the specified value in the specified measurement unit.

    Declaration
    public void SetContourWidth(double contourWidth, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double contourWidth

    The width of the contour effect.

    MeasurementUnit measurementUnit

    The measurement unit of the specified width.

    SetExtrusionHeight(Double, MeasurementUnit)

    Sets the height of the extrusion effect to the specified value in the specified measurement unit.

    Declaration
    public void SetExtrusionHeight(double height, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double height

    The height of the extrusion effect.

    MeasurementUnit measurementUnit

    The measurement unit of the specified height.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    %s requires a valid license key for further deployment. Get Trial Below.
    ironsuite
    Blue key in circleGet Started for Free
    30 days full access • No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet Started for Free
    The trial form was submitted successfully.
    Grey check in circleTrial key delivered
    Your key has been issued and sent to your email.
    Calendar in circleBook Free Live Demo
    No cards • no pitches • no commitments Pick a time for a quick, personalized demo
    Get the most out of your 30-day trial with:

    Live product and key features walk-through

    Project-specific recommendations

    All your questions answered

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation

    Want to deploy Iron Suite
    to a live project for FREE?

    What’s included?

    • Test in production without watermarks
    • 30 days fully functional product
    • 24/5 technical support during trial
    ironpdf Logo
    ironword Logo
    ironxl Logo
    ironppt Logo
    ironocr Logo
    ironbarcode Logo
    ironqr Logo
    ironprint Logo
    ironzip Logo
    ironwebscraper Logo
    Iron Software sales team
    Online 24/5
    Have Enterprise licensing requirements?
    Request Iron Suite Enterprise trial
    Key in blue circle

    Get your free 30-day Trial Key instantly

    Your trial license will be sent to your email address

    No limitations. 100% unlocked. No credit card.

    bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Or
    Key in blue circle

    Complete Your Trial Key Signup

    Tell us a little more about yourself.

    Key in blue circleNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Key in blue circle

    Your license key has been delivered to your inbox

    Can't find it? Check your spam folder.

    What’s next?
    Install with NuGet
    Add IronWord to your project
    Quickstart Guide
    Helpful resources to get started

    Need help getting started?

    Book a Free Live Demo

    See IronWord in action and get your licensing questions answered, or

    Key in blue circle

    Your demo request is in.

    You'll receive an invite via email shortly.

    What’s next?
    Explore Documentation
    Review Licensing Options
    badge_greencheck_in_yellowcircle
    Thank you
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronWord
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com