Но максимально выводится 274.
Выкладываю код. Что я делаю не правильно?
class MyClass{
//координаты
var $x;
var $y;
// цвет
var $R;
var $G;
var $B;
var $Radius;
Function Show(&$f) //f это ссыка на холст
{
$color1 = imageColorAllocate($f, $this->R, $this->G, $this->B);
imagefilledellipse($f,$this->x,$this->y,$this->Radius,$this->Radius,$color1);
}
function __construct($x, $y)
{
$this->x=$x;
$this->y=$y;
$this->R=rand(10,250);;
$this->G=rand(10,250);;
$this->B=rand(10,250);;
$this->Radius=50;
}
}
$MayArray = Array();
$tt=0;
$tt2=50;
for ($i=0; $i<20; $i++){
for($j=0; $j<20;$j++){
$MayArray[$i][$j]=new MyClass($tt += 50,$tt2);
}
$tt=0;
$tt2 += 50;
}
$i = imageCreate(1200,700);
$color = imageColorAllocate($i, 255,25,250);
imageSetPixel($i,30,50,$color);
for ($ii=0; $ii<20; $ii++)
for ($ii2=0; $ii2<20; $ii2++)
$MayArray[$ii][$ii2]->Show($i);
Header ("Content-type: image/jpeg");
imageJpeg($i);
imageDestroy($i);