Exemple #1
0
        //public XSSFChart CreateChart(IClientAnchor anchor)
        //{
        //    return CreateChart((XSSFClientAnchor)anchor);
        //}

        /**
         * Add the indexed picture to this Drawing relations
         *
         * @param pictureIndex the index of the picture in the workbook collection of pictures,
         *   {@link Npoi.Core.xssf.usermodel.XSSFWorkbook#getAllPictures()} .
         */
        internal PackageRelationship AddPictureReference(int pictureIndex)
        {
            XSSFWorkbook        wb     = (XSSFWorkbook)GetParent().GetParent();
            XSSFPictureData     data   = (XSSFPictureData)wb.GetAllPictures()[pictureIndex];
            PackagePartName     ppName = data.GetPackagePart().PartName;
            PackageRelationship rel    = GetPackagePart().AddRelationship(ppName, TargetMode.Internal, XSSFRelation.IMAGES.Relation);

            AddRelation(rel.Id, new XSSFPictureData(data.GetPackagePart(), rel));
            return(rel);
        }
Exemple #2
0
        /**
         * Return the dimension of the embedded image in pixel
         *
         * @return image dimension in pixels
         */

        public Size GetImageDimension()
        {
            XSSFPictureData picData = PictureData as XSSFPictureData;

            return(GetImageDimension(picData.GetPackagePart(), picData.PictureType));
        }