Shape rotation

Hi Mudassir,


I have tried to add a shape with rotation. If the angle is more than 180, it is not created properly with Aspose Slides for Java. I am using version 2.6.0.2. I have tried with the latest version 2.7.0 also. The same problem exists in that version too. Please provide a solution for the issue at the earliest.

I have attached a sample java file for the issue.

Thanks,
Mani.
(For ZohoCorp).

Hi Mani,

I have worked with the code snippet shared by you and have not been able to observe the issue specified. I have created the ellipse shape by rotating it to 358, 300 and 108 degrees and all have been rotated right. Please share your sample presentation for further reference.

Many Thanks,

Hi Mudassir,


Sorry for the delay in response. The sample files are attached.

Thanks,
Mani.
(For ZohoCorp).

Hi Mani,


I have further investigated the issue and have observed the issue. If rotation angle is greater than 180 then rotated shape angle rendered by Aspose.Slides is coming to be mirror angle of what is added. Like rotation angle of 240 (=270 -30) is rotated to angle to 300 (=270 +30) by Aspose.Slides. An issue with ID SLIDESJAVA-33147 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 automatically notified once the issue will be resolved. I have created a work around approach for you that will certainly help you for the time being.

Presentation preso = new Presentation();
Slide slide = preso.addEmptySlide();

System.out.println(“The slide layout is " + slide.getLayout());

Shapes shapes = slide.getShapes();
Ellipse oval = shapes.addEllipse(200, 300, 400, 500);
oval.setWidth(1952);
oval.setHeight(1155);
oval.addTextFrame(“Aspose.Slide Test”);
int angle=359;
int ang=angle;
if(angle >180 && angle <360)
{
angle=(360 -angle)+180;
}
oval.setRotation(angle);
preso.write(new FileOutputStream(“C:\Users\Mudassir\Downloads\shaperotate\test”+ang+”.ppt"));

Many Thanks,

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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.