RE: [Phpgedview-talk] Fan Chart v3.3.4 problem
Brought to you by:
canajun2eh,
yalnifj
From: Rodney H. <rm...@rm...> - 2005-07-25 12:44:15
|
Hello Matthew, Thanks a lot for that. Changed, as shown and it works a treat! http://rmhh.co.uk/tree2/fanchart.php Much obliged. Regards -- Rodney HALL Heywood, Lancashire Suaviter sed fortiter Agreeably but powerfully ~~~~~~~~~~~~~~ rm...@rm... http://rmhh.co.uk/ http://rmhh.org.uk/ ~~~~~~~~~~~~~~~~~~~ > -----Original Message----- > From: php...@li... > [mailto:php...@li...] On > Behalf Of Matthew Gates > Sent: Monday, July 25, 2005 2:04 PM > To: php...@li... > Subject: Re: [Phpgedview-talk] Fan Chart v3.3.4 problem > > On Monday 25 July 2005 09:39, Rodney Hall wrote: > > Hi Rodney, > > > Can anyone tell me what is meant by the following strings on the Fan > > Chart (followed by a blank fan chart) in v3.3.4? There are more such > > lines following. I can find no "imagettfbbox()" in fanchart.php. > > All other functions are working perfectly. > > I saw this as well in my installation of v3.2 final at > http://porpoisehead.net/gedview/ > > I think it's because the fontsize that is passed to the ImageTtfBbox > function has contents something like "6px" when the function expects > someting like "6.0". I made a temporary fix. I didn't > bother sending it > to the project because it's obviously a nasty kludge, and I > expect it is > fixed in more recent versions of the project. The change is in the > fanchart.php file, starting at about line 257: > > // calculate text position > $dfontsize = str_replace("px", ".0", $fontsize); // > CHANGE: new line > $bbox=ImageTtfBbox($dfontsize, 0, $fontfile, $text); // CHANGED > $textwidth = $bbox[4]; > $deg = $deg1+.44; > if ($deg2-$deg1>40) $deg = $deg1+($deg2-$deg1)/11; > if ($deg2-$deg1>80) $deg = $deg1+($deg2-$deg1)/7; > if ($deg2-$deg1>140) $deg = $deg1+($deg2-$deg1)/4; > if ($gen==0) $deg=180; > $rad=deg2rad($deg); > $mr=($rx-$rw/4)/2; > if ($gen>0 and $deg2-$deg1>80) $mr=$rx/2; > $tx=$cx + ($mr) * cos($rad); > $ty=$cy - $mr * -sin($rad); > if ($sosa==1) $ty-=$mr/2; > > // print text. next line CHANGED > ImageTtfText($image, $dfontsize, $tangle, $tx, $ty, > $color, $fontfile, > $text); > > > All the lines that have changed have a comment with CHANGED near them. > > > -- > > Rodney HALL > > Heywood, Lancashire > > > > Suaviter sed fortiter > > Agreeably but powerfully > > ~~~~~~~~~~~~~~ > > rm...@rm... > > http://rmhh.co.uk/ > > http://rmhh.org.uk/ > > ~~~~~~~~~~~~~~~~~~~ > > > > ----------------------------Example Warning > > lines------------------------------------- > > > > Warning: imagettfbbox() expects parameter 1 to be double, > string given > > in /tree2/fanchart.php on line 263 > > > > Warning: imagettftext() expects parameter 2 to be double, > string given > > in /tree2/fanchart.php on line 278 > > (unknown) LIDON > > Pedigree Tree > > Descendancy Chart > > Ancestry Chart > > Fan Chart > > Hourglass Chart > > < Marie Elizabeth LIDON > > < Louise LIDON > > > > Warning: imagettfbbox() expects parameter 1 to be double, > string given > > in /tree2/fanchart.php on line 263 > > > > Warning: imagettftext() expects parameter 2 to be double, > string given > > in /tree2/fanchart.php on line 278 > > Mary BRIDGE > > Pedigree Tree > > Descendancy Chart > > Ancestry Chart > > Fan Chart > > Hourglass Chart > > William Oliver Heywood LOVATT > > < Thomas LOVEATT > > < Joseph LOVEATT > > < Ruth LOVEATT > > < Eliza LOVATT > > < Fanny LOVATT > > > > Warning: imagettfbbox() expects parameter 1 to be double, > string given > > in /tree2/fanchart.php on line 263 > > > > Warning: imagettftext() expects parameter 2 to be double, > string given > > in /tree2/fanchart.php on line 278 > > William Oliver Heywood LOVATT > > Pedigree Tree > > Descendancy Chart > > Ancestry Chart > > Fan Chart > > Hourglass Chart > > Mary BRIDGE > > < Thomas LOVEATT > > < Joseph LOVEATT > > < Ruth LOVEATT > > < Eliza LOVATT > > < Fanny LOVATT > > > > Warning: imagettfbbox() expects parameter 1 to be double, > string given > > in /tree2/fanchart.php on line 263 > > > > Warning: imagettftext() expects parameter 2 to be double, > string given > > in /tree2/fanchart.php on line 278 > > Mary Anne LOMAX > > Pedigree Tree > > Descendancy Chart > > Ancestry Chart > > Fan Chart > > Hourglass Chart > > George HALL > > < Mary HALL > > < Sarah HALL > > < George HALL > > < John HALL > > < Thomas HALL > > < Joseph HALL > > < Samuel HALL |