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

Hello!

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”.

Thanks!

Nenad

@zpredojevic,
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.
autoShape.getEffectFormat().enableInnerShadowEffect();
autoShape.getEffectFormat().enableOuterShadowEffect();
autoShape.getEffectFormat().enableReflectionEffect();

// 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.

@Andrey_Potapov

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.

@zpredojevic,
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.

@Andrey_Potapov

Thanks a lot!
We’ll stay in touch.

@zpredojevic,
Thank you for using Aspose.Slides.

@zpredojevic,
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.

@Andrey_Potapov

That’s great news!

When is version 22.8 expected?

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

@Andrey_Potapov

Thanks!

The issues you have found earlier (filed as SLIDESJAVA-38878) have been fixed in Aspose.Slides for Java 22.8 (ZIP).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.