Skip to content

Commit 96419c5

Browse files
committed
Remove deprecated method renderAll()
1 parent ee60dbc commit 96419c5

File tree

1 file changed

+0
-76
lines changed

1 file changed

+0
-76
lines changed

src/MandelbrotSet.php

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -117,80 +117,4 @@ public function generate(MandelbrotSetRequest $request): void
117117
imagepng($im, $path = $this->tempDir . '/' . $request->getFileName());
118118
imagedestroy($im);
119119
}
120-
121-
122-
/**
123-
* @deprecated
124-
* @param int $width
125-
* @param int $height
126-
*/
127-
public function renderAll(int $width = 300, int $height = 300): void
128-
{
129-
$minX = -2; // Levý okraj
130-
$maxX = 1; // Pravý okraj
131-
$minY = ($height * ($maxX - $minX) / $width) / -2;// Horní okraj
132-
$maxY = ($height * ($maxX - $minX) / $width) / 2;// Dolní okraj
133-
134-
// čísla, kterými se bude násobit uhel
135-
$ax = [];
136-
for ($x = -7; $x <= 3; $x++) {
137-
$ax[] = $x;
138-
}
139-
sort($ax);
140-
141-
$ay = []; // čísla, kterými se bude mocnit vzdálenost
142-
for ($y = 0; $y <= 4; $y++) {
143-
$ay[] = $y;
144-
}
145-
sort($ay);
146-
147-
array_unshift($ax, false);
148-
array_unshift($ay, false);
149-
150-
echo '<table>';
151-
foreach ($ay as $d2) {
152-
echo '<tr>';
153-
foreach ($ax as $d1) {
154-
if ($d1 !== false && $d2 !== false) {
155-
$request = new MandelbrotSetRequest($d1, $d2, $width, $height, 18, $minX, $maxX, $minY, $maxY);
156-
157-
if ($d1 * $d2 % 2) {
158-
$bgColor = 'eeeeee';
159-
} elseif ($d1 % 2) {
160-
$bgColor = 'f5f5f5';
161-
} elseif ($d2 % 2) {
162-
$bgColor = 'f5f5f5';
163-
} else {
164-
$bgColor = 'fbfbfb';
165-
}
166-
167-
echo '<td bgcolor="' . $bgColor . '"><img src="' . $this->loadImage($request) . '" border="0"></td>';
168-
} elseif ($d1 === false && $d2 !== false) { // Zobrazení popisku osy
169-
echo '<td valign="middle">';
170-
171-
if ((int) round($d2) === (int) $d2) {
172-
echo '<h2>^' . $d2 . '&nbsp;</h2>';
173-
} else {
174-
echo '^' . $d2 . '&nbsp;';
175-
}
176-
177-
echo '</td>';
178-
} elseif ($d2 === false && $d1 !== false) { // Zobrazení popisku osy
179-
echo '<td align="center">';
180-
181-
if ((int) round($d1) === (int) $d1) {
182-
echo '<h2>*' . $d1 . '</h2>';
183-
} else {
184-
echo '*' . $d1 . '';
185-
}
186-
187-
echo '</td>';
188-
} else {
189-
echo '<td>&nbsp;</td>';
190-
}
191-
}
192-
echo '</tr>';
193-
}
194-
echo '</table>';
195-
}
196120
}

0 commit comments

Comments
 (0)