3 final class PhabricatorLipsumMondrianArtist
extends PhabricatorLipsumArtist
{
5 protected function draw($image, $x, $y) {
8 imagefill($image, 0, 0, $c_white);
10 $lines_h = mt_rand(2, 5);
11 $lines_v = mt_rand(2, 5);
13 for ($ii = 0; $ii < $lines_h; $ii++
) {
16 $thickness = mt_rand(2, 3);
17 for ($jj = 0; $jj < $thickness; $jj++
) {
18 imageline($image, 0, $yp +
$jj, $x, $yp +
$jj, $c_black);
22 for ($ii = 0; $ii < $lines_v; $ii++
) {
25 $thickness = mt_rand(2, 3);
26 for ($jj = 0; $jj < $thickness; $jj++
) {
27 imageline($image, $xp +
$jj, 0, $xp +
$jj, $y, $c_black);
31 $fills = mt_rand(3, 8);
32 for ($ii = 0; $ii < $fills; $ii++
) {
33 $xp = mt_rand(0, $x - 1);
34 $yp = mt_rand(0, $y - 1);
35 if (imagecolorat($image, $xp, $yp) != $c_white) {
39 $c_fill = $this->getHSBColor(
41 mt_rand(80, 100) / 100,
42 mt_rand(90, 100) / 100);
44 imagefill($image, $xp, $yp, $c_fill);