by ozi1985 on Wed Jul 15, 2009 10:03 am
([msg=26850]see Re: php programming 4[/msg])
i wasn't allowed to send messages for some reason. I'll just port parts here. It won't be enough to help with the actual translation, so i guess its ok.
I have two classes in my php code. One for Line, and one for Arc.
a line will be presented like this:
object(Line)#1 (5) {
["XEnd"]=> string(5) "402.2"
["YEnd"]=> string(5) "411.2"
["XStart"]=> string(5) "402.2"
["YStart"]=> string(5) "420.8"
["Color"]=> string(3) "red"
}
Then the imageline is: imageline($img, $XStart, $YStart, $XEnd, $YEnd, $color);
And Arc will be presented like this:
object(Arc)#91 (6) {
["XCenter"]=> string(5) "261.8"
["YCenter"]=> string(5) "386.8"
["ArcStart"]=> string(3) "165"
["Radius"]=> string(3) "4.2"
["ArcExtend"]=> string(3) "230"
["Color"]=> string(6) "yellow"
}
then the imagearc is: imagearc($img, $XCenter, $YCenter, $Radius, $Radius, $ArcStart, $ArcExtend, $color);
The imagearc is supposed to be
imagearc ( resource $image , int $cx , int $cy , int $width , int $height , int $start , int $end , int $color )
So i don't really know where to look now... I get the xml reading correct (I checked the values i got against the xml document), but the image is something I can't read. I don't know if it's just me being blind here... the color variable is with a small c, if anyone wants to comment on this. And I know I'm supposed to use lowchar on the first letter of a variable, but it was easier to see this way...