I'm currently working on trying to resize shapes and it seems that some shapes are not resizing even when I explicitly set the value of the width/height. For ITables, the resizing does not work at all as I have to resize every single TableColumn (TableRow's height is not settable).
For example, I'm trying to resize all shapes to its new size but the height and width values stay the same (for some shapes)
- Code: Select all
foreach (IMasterSlide masterSlide in slideToAdjust.Presentation.Masters) {
foreach (IShape shape in masterSlide.Shapes) {
shape.Height = shape.Height * ratioHeight;
shape.Width = shape.Width * ratioWidth;
shape.Left = shape.Left * ratioWidth;
shape.Top = shape.Top * ratioHeight;
if (shape is Line) {
var autoShape = (IAutoShape)shape;
autoShape.Height *= ratioHeight;
autoShape.Width *= ratioWidth;
}
}
}
If I'm doing something wrong please let me know, thanks in advance!