Fixed deprecated GD usage

This commit is contained in:
Ingo Schommer 2013-03-19 10:51:39 +01:00
parent 4cd6d00159
commit b282c9f8f3
2 changed files with 4 additions and 6 deletions

View File

@ -57,8 +57,7 @@ class GDBackend extends Object implements Image_Backend {
} }
public function setGD($gd) { public function setGD($gd) {
Deprecation::notice('3.1', 'Use GD::setImageResource instead', Deprecation::notice('3.1', 'Use GD::setImageResource instead');
Deprecation::SCOPE_CLASS);
return $this->setImageResource($gd); return $this->setImageResource($gd);
} }
@ -67,8 +66,7 @@ class GDBackend extends Object implements Image_Backend {
} }
public function getGD() { public function getGD() {
Deprecation::notice('3.1', 'GD::getImageResource instead', Deprecation::notice('3.1', 'GD::getImageResource instead');
Deprecation::SCOPE_CLASS);
return $this->getImageResource(); return $this->getImageResource();
} }

View File

@ -46,8 +46,8 @@ class GDTest extends SapphireTest {
$samples = array(); $samples = array();
for($y = 0; $y < $vertical; $y++) { for($y = 0; $y < $vertical; $y++) {
for($x = 0; $x < $horizontal; $x++) { for($x = 0; $x < $horizontal; $x++) {
$colour = imagecolorat($gd->getGD(), $x * 5, $y * 5); $colour = imagecolorat($gd->getImageResource(), $x * 5, $y * 5);
$samples[] = ImageColorsforIndex($gd->getGD(), $colour); $samples[] = ImageColorsforIndex($gd->getImageResource(), $colour);
} }
} }
return $samples; return $samples;