Logo Search packages:      
Sourcecode: acidbase version File versions  Download package

Cpdf::PRVTgetTextPosition ( x,
y,
angle,
size,
wa,
text 
)

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

private

Definition at line 1977 of file class.pdf.php.

References getTextWidth().

Referenced by addText(), and PRVTcheckTextDirective1().

                                                          {
  // 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);
  return array(cos($a)*$w+$x,-sin($a)*$w+$y);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index