PHPRtfLite_Image::getImageRtfWidth PHP Méthode

getImageRtfWidth() private méthode

gets rtf image width
private getImageRtfWidth ( ) : integer
Résultat integer
    private function getImageRtfWidth()
    {
        if ($this->_width > 0) {
            return PHPRtfLite_Unit::getUnitInTwips($this->_width);
        }
        $imageWidth = $this->_imageWidth ? $this->_imageWidth : 100;
        if ($this->_height > 0) {
            $imageHeight = $this->_imageHeight ? $this->_imageHeight : 100;
            $width = $imageWidth / $imageHeight * $this->_height;
            return PHPRtfLite_Unit::getUnitInTwips($width);
        }
        return PHPRtfLite_Unit::getPointsInTwips($imageWidth);
    }