Location: PHPKode > projects > PHP Cad and Drawing Program > phpcad/functions/tttextoutline.inc
AAAAAAAAAAAAAAAAAAAAAAAAA
//
//    Use by hand. Fonts relative to scale 10.
//    Puts truetype font on screen.
//
//    $dir = direction
//    $color = color
//    $ttfont = truetype font name, example 'arial.ttf'
//    $ttext =  text to print, example 'Hello World'
//    $fontsize = relative to scale = 10.
//
function tttextoutline($image,$fontsize,$angle,$tclr,$toutclr,$ttfont,$text,$width,$scale,$x,$y) {
    $red  = hexdec(substr($tclr,0,2));
    $grn  = hexdec(substr($tclr,2,2));
    $blu  = hexdec(substr($tclr,4,2));
    $clr = ImageColorAllocate($image,$red,$grn,$blu);
    $red  = hexdec(substr($toutclr,0,2));
    $grn  = hexdec(substr($toutclr,2,2));
    $blu  = hexdec(substr($toutclr,4,2));
    $outclr = ImageColorAllocate($image,$red,$grn,$blu);
  $ttfont=getcwd() . "/ttf/$ttfont";
  $fontsize=$fontsize*$scale/10;
  $x=$x*$scale;
  $y=$y*$scale;
  $width=$width*$scale/10;
  $a=($x-abs($width));
  $b=($x+abs($width));
  $c=($y-abs($width));
  $d=($y+abs($width));
  for ($xc = $a; $xc <= $b; $xc++) {
      for ($yc = $c; $yc <= $d; $yc++) {
          imagettftext($image,$fontsize,$angle,$xc,$yc,$outclr,$ttfont,$text);
      }
  }
$text2 = imagettftext($image,$fontsize,$angle,$x,$y,$clr,$ttfont,$text);
}
BBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCC
function tttextoutline($image,$fontsize,$angle,$tclr,$touclr,$ttfont,$text,$width,$scale,$x,$y){}
DDDDDDDDDDDDDDDDDDDDDDDD
$inthemenu = "no";
$dirlist= array("NA");
$lenlist= array("NA");
$txtitem="AAAAAA";
EEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Return current item: PHP Cad and Drawing Program