1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-29 16:50:07 +02:00

switched default color from transparent-black to transparent-white (still 100% transparent)

This commit is contained in:
Oliver Vogel
2014-05-23 17:19:02 +02:00
parent c471b680a1
commit 29ca49baa7
3 changed files with 13 additions and 13 deletions

View File

@@ -132,7 +132,7 @@ abstract class AbstractColor
break;
case is_null($value):
$this->initFromArray(array(0, 0, 0, 0));
$this->initFromArray(array(255, 255, 255, 0));
break;
default:

View File

@@ -9,14 +9,14 @@ class GdColorTest extends PHPUnit_Framework_TestCase
public function testConstructor()
{
$c = new Color;
$this->validateColor($c, 0, 0, 0, 127);
$this->validateColor($c, 255, 255, 255, 127);
}
public function testParseNull()
{
$c = new Color;
$c->parse(null);
$this->validateColor($c, 0, 0, 0, 127);
$this->validateColor($c, 255, 255, 255, 127);
}
public function testParseInteger()
@@ -152,7 +152,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getInt();
$this->assertInternalType('int', $i);
$this->assertEquals($i, 2130706432);
$this->assertEquals(2147483647, $i);
$c = new Color(array(255, 255, 255));
$i = $c->getInt();
@@ -185,7 +185,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getHex();
$this->assertInternalType('string', $i);
$this->assertEquals($i, '000000');
$this->assertEquals($i, 'ffffff');
$c = new Color(array(255, 255, 255, 1));
$i = $c->getHex();
@@ -208,7 +208,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getArray();
$this->assertInternalType('array', $i);
$this->assertEquals($i, array(0, 0, 0, 0));
$this->assertEquals($i, array(255, 255, 255, 0));
$c = new Color(array(255, 255, 255, 1));
$i = $c->getArray();
@@ -231,7 +231,7 @@ class GdColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getRgba();
$this->assertInternalType('string', $i);
$this->assertEquals($i, 'rgba(0, 0, 0, 0.00)');
$this->assertEquals($i, 'rgba(255, 255, 255, 0.00)');
$c = new Color(array(255, 255, 255, 1));
$i = $c->getRgba();

View File

@@ -40,14 +40,14 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
public function testConstructor()
{
$c = new Color;
$this->validateColor($c, 0, 0, 0, 0);
$this->validateColor($c, 255, 255, 255, 0);
}
public function testParseNull()
{
$c = new Color;
$c->parse(null);
$this->validateColor($c, 0, 0, 0, 0);
$this->validateColor($c, 255, 255, 255, 0);
}
public function testParseInteger()
@@ -187,7 +187,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getInt();
$this->assertInternalType('int', $i);
$this->assertEquals($i, 0);
$this->assertEquals($i, 16777215);
$c = new Color(array(255, 255, 255));
$i = $c->getInt();
@@ -225,7 +225,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getHex();
$this->assertInternalType('string', $i);
$this->assertEquals($i, '000000');
$this->assertEquals($i, 'ffffff');
$c = new Color(array(255, 255, 255, 1));
$i = $c->getHex();
@@ -248,7 +248,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getArray();
$this->assertInternalType('array', $i);
$this->assertEquals($i, array(0, 0, 0, 0));
$this->assertEquals($i, array(255, 255, 255, 0));
$c = new Color(array(255, 255, 255, 1));
$i = $c->getArray();
@@ -271,7 +271,7 @@ class ImagickColorTest extends PHPUnit_Framework_TestCase
$c = new Color;
$i = $c->getRgba();
$this->assertInternalType('string', $i);
$this->assertEquals($i, 'rgba(0, 0, 0, 0.00)');
$this->assertEquals($i, 'rgba(255, 255, 255, 0.00)');
$c = new Color(array(255, 255, 255, 1));
$i = $c->getRgba();