Outline gradient direction (1850)

Hi,

I’m getting incorrect values for gradient direction of text outline effect.

Here’s the test:

String path = "outlineEffect.pptx";

Presentation presentation = null;

try {

    presentation = new Presentation(path);

    ISlide slide = presentation.getSlides().get_Item(0);

    IShapeCollection shapes = slide.getShapes();

    IAutoShape shape = (IAutoShape) shapes.get_Item(0);

    IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(2);

    IPortionCollection portions = paragraph.getPortions();

    IPortion portion = portions.get_Item(0);

    assertEquals("text ", portion.getText()); //$NON-NLS-1$

    portion = portions.get_Item(1);

    ILineFormatEffectiveData lineFormat = portion.createPortionFormatEffective().getLineFormat();

    ILineFillFormatEffectiveData fillformat = lineFormat.getFillFormat();

    assertEquals(FillType.Gradient, fillformat.getFillType());

    assertEquals("Gradient ", portion.getText()); //$NON-NLS-1$

    IGradientFormatEffectiveData gradientFormat = lineFormat.getFillFormat().getGradientFormat();

    // Gradient direction is From Bottom Left Corner
    assertEquals(GradientDirection.FromCorner3, gradientFormat.getGradientDirection());

    portion = portions.get_Item(2);

    lineFormat = portion.createPortionFormatEffective().getLineFormat();

    fillformat = lineFormat.getFillFormat();

    assertEquals(FillType.Gradient, fillformat.getFillType());

    assertEquals("radial", portion.getText()); //$NON-NLS-1$

    gradientFormat = lineFormat.getFillFormat().getGradientFormat();

    assertEquals(GradientShape.Radial, gradientFormat.getGradientShape());

    // Gradient direction is From Bottom Left Corner
    assertEquals(GradientDirection.FromCorner3, gradientFormat.getGradientDirection());

    paragraph = shape.getTextFrame().getParagraphs().get_Item(4);

    portions = paragraph.getPortions();

    portion = portions.get_Item(0);

    lineFormat = portion.createPortionFormatEffective().getLineFormat();

    fillformat = lineFormat.getFillFormat();

    assertEquals(FillType.Gradient, fillformat.getFillType());

    assertEquals("Gradient rectangular", portion.getText()); //$NON-NLS-1$

    gradientFormat = lineFormat.getFillFormat().getGradientFormat();

    assertEquals(GradientShape.Rectangle, gradientFormat.getGradientShape());

    // Gradient direction is From Top Right Corner
    assertEquals(GradientDirection.FromCorner2, gradientFormat.getGradientDirection());

} finally {

    if (presentation != null) {
	    presentation.dispose();
    }
}

Can you check this?

Thanks,
Zeljko

outlineEffect.zip (25.7 KB)

@Zeljko,

I have observed the sample code and information shared by you. An issue with ID SLIDESJAVA-37342 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@Zeljko,

We have initiated the investigation on our end. We have not been able to find any problems with the direction of the gradient and got the expected values: FromCorner3 (From Bottom Left Corner), FromCorner3 (From Bottom Left Corner), FromCorner2 (From Top Right Corner). Can you please share details that what is wrong with the direction of the gradient?

The issues you have found earlier (filed as SLIDESJAVA-37342) have been fixed in this update.