• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/captcha.php
  • Класс: CCaptcha
  • Вызов: CCaptcha::DrawEllipses
function DrawEllipses()
{
	if ($this->numEllipses > 0)
	{
		for ($i = 0; $i < $this->numEllipses; $i++)
		{
			$arEllipseColor = $this->GetColor($this->arEllipseColor);
			$color = imagecolorallocate($this->image, $arEllipseColor[0], $arEllipseColor[1], $arEllipseColor[2]);
			imagefilledellipse($this->image, round(rand(0, $this->imageWidth)), round(rand(0, $this->imageHeight)), round(rand(0, $this->imageWidth / 8)), round(rand(0, $this->imageHeight / 2)), $color);
		}
	}
}