/// <summary> /// Creates a picture. /// </summary> /// <param name="anchor">the client anchor describes how this Group Is attached /// to the sheet.</param> /// <param name="pictureIndex">Index of the picture.</param> /// <returns>the newly Created shape.</returns> public HSSFPicture CreatePicture(HSSFChildAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(this, anchor); shape.Anchor = anchor; shape.PictureIndex = pictureIndex; shapes.Add(shape); return(shape); }
/// <summary> /// Creates a picture. /// </summary> /// <param name="anchor">the client anchor describes how this Group is attached /// to the sheet.</param> /// <param name="pictureIndex">Index of the picture.</param> /// <returns>the newly created shape.</returns> public IPicture CreatePicture(HSSFClientAnchor anchor, int pictureIndex) { HSSFPicture shape = new HSSFPicture(null, (HSSFClientAnchor)anchor); shape.PictureIndex = pictureIndex; shape.Anchor = (HSSFClientAnchor)anchor; AddShape(shape); EscherBSERecord bse = (_sheet.Workbook as HSSFWorkbook).Workbook.GetBSERecord(pictureIndex); bse.Ref = (bse.Ref + 1); return(shape); }