Hi
I observed that rectangle shape is not the same in PPTX as in PPT. Even in forum link http://www.aspose.com/documentation/.net-components/aspose.slides-for-.net/adding-rectangle-shape-to-slide-1.html it is given as Rectangle shape appearing in blue color fill by default in PPTX. But this is not the case in PPT.
Also I tried with sample code on adding rectangle with red color in PPT and PPTX. I could see that the rectangle is positioned in different positions in PPT and PPTX eventhough the parameters that I used to create Reactangle is same in both the cases.
Please clarify.
Code is given below and the output is in the attachements.
Rectangle with PPT:
Presentation pres = new Presentation();
Slide sld = pres.Slides[0];
sld.Shapes.AddRectangle(10, 20, 50, 100);
foreach (Shape shape in sld.Shapes)
{
shape.FillFormat.Type = FillType.Solid;
shape.FillFormat.ForeColor = System.Drawing.Color.Red;
}
pres.Write("C:\\PPT Output.ppt");
Rectangle with PPTX:
PresentationEx pres = new PresentationEx();
SlideEx sld = pres.Slides[0];
//System.Drawing.Image img = (System.Drawing.Image)new System.Drawing.Bitmap("C:\\Documents and Settings\\327308\\My Documents\\My Pictures\\images.jpg");
//ImageEx imgx = pres.Images.AddImage(img);
//sld.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle, 30, 20, imgx.Width, imgx.Height, imgx);
//sld.Shapes.InsertPictureFrame(pres.Images.Count, ShapeTypeEx.Ellipse, 100, 150, imgx.Width, imgx.Height, imgx);
//sld.Shapes.InsertAutoShape(0, ShapeTypeEx.Rectangle, 10, 20, 50, 100);
int index = sld.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 10, 20, 50, 100);
foreach (ShapeEx shape in sld.Shapes)
{
shape.FillFormat.FillType = FillTypeEx.Solid;
shape.FillFormat.SolidFillColor.Color = System.Drawing.Color.Red;
}
pres.Write("C:\\PPTX Output.pptx");