mirror of
https://github.com/Intervention/image.git
synced 2025-08-23 14:02:47 +02:00
Rename Image::blendTransparency() to Image::background()
This commit is contained in:
@@ -283,29 +283,29 @@ final class ImageTest extends GdTestCase
|
||||
$this->assertInstanceOf(Image::class, $this->image->text('test', 0, 0, new Font()));
|
||||
}
|
||||
|
||||
public function testBlendTransparencyDefault(): void
|
||||
public function testBackgroundDefault(): void
|
||||
{
|
||||
$image = $this->readTestImage('gradient.gif');
|
||||
$this->assertColor(0, 0, 0, 0, $image->pickColor(1, 0));
|
||||
$result = $image->blendTransparency();
|
||||
$result = $image->background();
|
||||
$this->assertColor(255, 255, 255, 255, $image->pickColor(1, 0));
|
||||
$this->assertColor(255, 255, 255, 255, $result->pickColor(1, 0));
|
||||
}
|
||||
|
||||
public function testBlendTransparencyArgument(): void
|
||||
public function testBackgroundArgument(): void
|
||||
{
|
||||
$image = $this->readTestImage('gradient.gif');
|
||||
$this->assertColor(0, 0, 0, 0, $image->pickColor(1, 0));
|
||||
$result = $image->blendTransparency('ff5500');
|
||||
$result = $image->background('ff5500');
|
||||
$this->assertColor(255, 85, 0, 255, $image->pickColor(1, 0));
|
||||
$this->assertColor(255, 85, 0, 255, $result->pickColor(1, 0));
|
||||
}
|
||||
|
||||
public function testBlendTransparencyIgnoreTransparencyInBlendingColor(): void
|
||||
public function testBackgroundIgnoreTransparencyInBackgroundColor(): void
|
||||
{
|
||||
$image = $this->readTestImage('gradient.gif');
|
||||
$this->assertColor(0, 0, 0, 0, $image->pickColor(1, 0));
|
||||
$result = $image->blendTransparency('ff550055');
|
||||
$result = $image->background('ff550055');
|
||||
$this->assertColor(255, 85, 0, 255, $image->pickColor(1, 0));
|
||||
$this->assertColor(255, 85, 0, 255, $result->pickColor(1, 0));
|
||||
}
|
||||
|
Reference in New Issue
Block a user