lib/ezpdf/classes/class.pdf.php
function PRVTgetTextPosition( $x, $y, $angle, $size, $wa, $text )
    {
        $tmp = false;
        // given this information return an array containing x and y for the end position as elements 0 and 1

        $w = $this->getTextWidth($size,$text);
        // need to adjust for the number of spaces in this text
        $words = explode(' ',$text);
        $nspaces=count($words)-1;
        $w += $wa*$nspaces;
        $a = deg2rad((float)$angle);
        if ( $tmp )
        {
            return array($this->xOffset(),-sin($a)*$w+$y);
        }
        return array(cos($a)*$w+$x,-sin($a)*$w+$y);
    }
function PRVTgetTextPosition( $x, $y, $angle, $size, $wa, $text )
    {
        $tmp = false;
        // given this information return an array containing x and y for the end position as elements 0 and 1

        $w = $this->getTextWidth($size,$text);
        // need to adjust for the number of spaces in this text
        $words = explode(' ',$text);
        $nspaces=count($words)-1;
        $w += $wa*$nspaces;
        $a = deg2rad((float)$angle);
        if ( $tmp )
        {
            return array($this->xOffset(),-sin($a)*$w+$y);
        }
        return array(cos($a)*$w+$x,-sin($a)*$w+$y);
    }
function PRVTgetTextPosition ( $ x , $ y , $ angle , $ size , $ wa , $ text ) { $ tmp = false ; // given this information return an array containing x and y for the end position as elements 0 and 1 $ w = $ this -> getTextWidth ( $ size , $ text ) ; // need to adjust for the number of spaces in this text $ words = explode ( ' ' , $ text ) ; $ nspaces = count ( $ words ) - 1 ; $ w += $ wa * $ nspaces ; $ a = deg2rad ( ( float ) $ angle ) ; if ( $ tmp ) { return array ( $ this -> xOffset ( ) , - sin ( $ a ) * $ w + $ y ) ; } return array ( cos ( $ a ) * $ w + $ x , - sin ( $ a ) * $ w + $ y ) ; }
given a start position and information about how text is to be laid out, calculate where
on the page the text will end

@access private
given a start position and information about how text is to be laid out calculate where on the page the text will end