I tried adding an image to a table cell but with the only two options of PictureFillModeEx.Stretch or Tile tends distort the images.
As a result, I want to add an image where a specific table cell is located but the cell.OffsetX and cell.OffsetY methods are not accurate or I am unsure how to use them.
What is the proper method of getting the X,Y coordinates of a table cell?
private void AddStatusImage(PresentationEx presentation, SlideEx slide, TableEx table, CellEx cell, Status status)
{
ImageEx image = this.GetImage(presentation, status);
if(image!=null)
{
int id = slide.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle,Convert.ToSingle(cell.OffsetX),Convert.ToSingle(cell.OffsetY),image.Width, image.Height, image);
PictureFrameEx picfram = (PictureFrameEx)slide.Shapes[id];
// Setting relative scale width and height
picfram.RelativeScaleHeight = 1.00f;
picfram.RelativeScaleWidth = 1.00f;
}
}