Skip to main content

InnerShadowEffect Class

Contains properties used to configure an inner shadow effect.

Declaration

public class InnerShadowEffect extends OfficeObject

Remarks

Use the following methods to configure the inner shadow effect:

The following code snippet applies an inner shadow effect to a shape:

import com.devexpress.docs.*;
import com.devexpress.docs.office.*;
import com.devexpress.system.drawing.*;
import com.devexpress.docs.presentation.*;

// Create a presentation.
try(Presentation presentation = new Presentation()) {
    // Access the first (blank) slide in the presentation.
    Slide slide = presentation.getSlides().getFirst();

    LineStyle outlineStyle = new LineStyle();
    outlineStyle.setFill(new SolidFill(Color.getRoyalBlue()));
    outlineStyle.setWidth(8);

    InnerShadowEffect innerShadowEffect = new InnerShadowEffect();
    innerShadowEffect.setAngle(45);
    innerShadowEffect.setBlurRadius(40);
    innerShadowEffect.setColor(new OfficeColor(Color.getGray()));
    innerShadowEffect.setDistance(50);

    ShapeEffectProperties effectProperties = new ShapeEffectProperties();
    effectProperties.setInnerShadow(innerShadowEffect);

    Shape shape = new Shape(ShapeType.getRectangle(), 10, 10, 300, 300) {{
        setOutline(outlineStyle);
        setFill(new SolidFill(Color.getWhite()));
        setEffects(effectProperties);
    }};

    slide.getShapes().add(shape);

    // Perform additional presentation processing logic.
}

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
OfficeObject
InnerShadowEffect

InnerShadowEffect()

Initializes a new instance of the InnerShadowEffect class.

Declaration

public InnerShadowEffect()

Methods

deepClone() Method

Returns a deep copy of this InnerShadowEffect instance.

Declaration

public InnerShadowEffect deepClone()

Returns

Type Description
InnerShadowEffect

A deep copy of this InnerShadowEffect.

getAngle() Method

Returns the direction of the shadow’s offset.

Declaration

public float getAngle()

Returns

Type Description
float

An angle in degrees.

getBlurRadius() Method

Returns the blur radius of the inner shadow.

Declaration

public float getBlurRadius()

Returns

Type Description
float

The blur radius in Document units (1/300 inch).

getColor() Method

Returns the shadow color.

Declaration

public OfficeColor getColor()

Returns

Type Description
OfficeColor

The shadow color.

getDistance() Method

Returns the distance of the inner shadow’s offset.

Declaration

public float getDistance()

Returns

Type Description
float

The distance of the inner shadow’s offset.

setAngle(float value) Method

Sets the direction of the shadow’s offset.

Declaration

public void setAngle(float value)

Parameters

Name Type Description
value float

An angle in degrees.

setBlurRadius(float value) Method

Sets the blur radius of the inner shadow.

Declaration

public void setBlurRadius(float value)

Parameters

Name Type Description
value float

The blur radius in Document units (1/300 inch).

setColor(OfficeColor value) Method

Sets the shadow color.

Declaration

public void setColor(OfficeColor value)

Parameters

Name Type Description
value OfficeColor

The shadow color.

setDistance(float value) Method

Sets the distance of the inner shadow’s offset.

Declaration

public void setDistance(float value)

Parameters

Name Type Description
value float

The distance of the inner shadow’s offset.