utils: Color is now immutable

as is always the case with mutability, allowing this creates lots of complications that aren't worth the hassle.
This commit is contained in:
Dylan K. Taylor
2019-07-04 18:00:37 +01:00
parent 062e692069
commit a125980ada
2 changed files with 4 additions and 36 deletions

View File

@@ -53,15 +53,6 @@ class Color{
return $this->a;
}
/**
* Sets the alpha (opacity) value of this colour, lower = more transparent
*
* @param int $a
*/
public function setA(int $a) : void{
$this->a = $a & 0xff;
}
/**
* Retuns the red value of this colour.
* @return int
@@ -70,15 +61,6 @@ class Color{
return $this->r;
}
/**
* Sets the red value of this colour.
*
* @param int $r
*/
public function setR(int $r) : void{
$this->r = $r & 0xff;
}
/**
* Returns the green value of this colour.
* @return int
@@ -87,15 +69,6 @@ class Color{
return $this->g;
}
/**
* Sets the green value of this colour.
*
* @param int $g
*/
public function setG(int $g) : void{
$this->g = $g & 0xff;
}
/**
* Returns the blue value of this colour.
* @return int
@@ -104,15 +77,6 @@ class Color{
return $this->b;
}
/**
* Sets the blue value of this colour.
*
* @param int $b
*/
public function setB(int $b) : void{
$this->b = $b & 0xff;
}
/**
* Mixes the supplied list of colours together to produce a result colour.
*