We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Instantiation of Effect Objects after Removing the EffectFactory Class from the API


I need a little help with instantiating certain classes. Specifically, we are talking about objects that I would store in variables of type IInnerShadow, IOuterShadow and IReflection.

On versions of your product (for Java) 22.3 and below, I used the following syntax relying on the EffectFactory class:

IInnerShadow innerShadow = new EffectFactory().createInnerShadow();
IOuterShadow outerShadow = new EffectFactory().createOuterShadow();
IReflection reflection = new EffectFactory().createReflection();

However, in versions 22.4 and later, the EffectFactory class has been removed from the API and I need another solution. I noticed that something can be done using the EffectFormat class, but I cannot instantiate it by simply calling the constructor, i.e. when I do that I get an error with the message “‘EffectFormat(com.aspose.slides.v9)’ is not public in ‘com.aspose.slides.EffectFormat’. Cannot be accessed from outside package”.



Thank you for describing the issue. You are right, it seems to be the EffectFactory class has been removed after the version 22.3 and this update was not announced in Release Notes. We apologize for any inconvenience. Please use the following code snippet to access effect options:

// Enable the effects.

// Get effect options.
IInnerShadow innerShadow = autoShape.getEffectFormat().getInnerShadowEffect();
IOuterShadow outerShadow = autoShape.getEffectFormat().getOuterShadowEffect();
IReflection reflection = autoShape.getEffectFormat().getReflectionEffect();

We will improve our documentation about shape effects soon.


Thanks for the quick reply.

I wonder if there is a possibility to use an object that would be stored in the variables of mentioned three types (IInnerShadow, IOuterShadow and IReflection), without using the “autoShape” instance?

Specifically, I would only need instances of the specified objects to which I would later set the values, and in the place where I work with them, I do not have any concrete objects of “autoShape” or similar types.

I’ve added a ticket with ID SLIDESJAVA-38878 to our issue tracking system. Our development team will review your requirements. We will reply to you soon.


Thanks a lot!
We’ll stay in touch.

Thank you for using Aspose.Slides.

Our developers reviewed the issue you have encountered. The EffectFactory class has been hidden by mistake and will be available in Aspose.Slides 22.8.


That’s great news!

When is version 22.8 expected?

Aspose.Slides 22.8 will be published in the second half of August.