Ejemplo n.º 1
0
        /**
         * Get the height of this image as rendered within Excel
         *
         * @param unit the unit of measurement
         * @return the height of the image within Excel
         */
        public virtual double getHeight(LengthUnit unit)
        {
            double heightInPoints = getHeightInPoints();

            return(heightInPoints * LengthConverter.getConversionFactor
                       (LengthUnit.POINTS, unit));
        }
Ejemplo n.º 2
0
        /**
         * Gets the vertical resolution of the image, if that information
         * is available.
         *
         * @return the number of dots per unit specified, if available, 0 otherwise
         */
        public virtual double getVerticalResolution(LengthUnit unit)
        {
            int res = getPngReader().getVerticalResolution();

            return(res / LengthConverter.getConversionFactor(LengthUnit.METRES, unit));
        }
Ejemplo n.º 3
0
        /**
         * Get the width of this image as rendered within Excel
         *
         * @param unit the unit of measurement
         * @return the width of the image within Excel
         */
        public virtual double getWidth(LengthUnit unit)
        {
            double widthInPoints = getWidthInPoints();

            return(widthInPoints * LengthConverter.getConversionFactor(LengthUnit.POINTS, unit));
        }