From 3bcb7781dd2d938e13647d4e5cd414b384a4917a Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 1 Jan 2023 18:36:54 +0000 Subject: [PATCH] Removed unfinished Colour implementation. --- VERSION | 2 +- src/Colour.php | 17 ----------------- src/ColourARGB.php | 26 -------------------------- src/ColourLegacy.php | 25 ------------------------- src/ColourRGB.php | 34 ---------------------------------- tools/precommit.sh | 0 6 files changed, 1 insertion(+), 103 deletions(-) delete mode 100644 src/Colour.php delete mode 100644 src/ColourARGB.php delete mode 100644 src/ColourLegacy.php delete mode 100644 src/ColourRGB.php mode change 100644 => 100755 tools/precommit.sh diff --git a/VERSION b/VERSION index f8dfde8..64d11d4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2202.281831 +0.2301.11835 diff --git a/src/Colour.php b/src/Colour.php deleted file mode 100644 index 59644c7..0000000 --- a/src/Colour.php +++ /dev/null @@ -1,17 +0,0 @@ -raw >> 24) & 0xFF; - } - - public function getAlpha(): float { - return ((float)$this->getAlphaRaw() / 0xFF); - } - - public function toString(): IString { - return new AString(sprintf( - 'rgba(%d,%d,%d,%F)', - $this->getRed(), - $this->getGreen(), - $this->getBlue(), - round($this->getAlpha(), 3) - )); - } -} diff --git a/src/ColourLegacy.php b/src/ColourLegacy.php deleted file mode 100644 index 4015021..0000000 --- a/src/ColourLegacy.php +++ /dev/null @@ -1,25 +0,0 @@ -raw & self::INHERIT) > 0; - } - - public function toString(): IString { - if($this->shouldInherit()) { - static $inherit = null; - if($inherit === null) - $inherit = new AString('inherit'); - return $inherit; - } - - return parent::toString(); - } -} diff --git a/src/ColourRGB.php b/src/ColourRGB.php deleted file mode 100644 index 63bd87d..0000000 --- a/src/ColourRGB.php +++ /dev/null @@ -1,34 +0,0 @@ -raw = $raw; - } - - public function getRaw(): int { - return $this->raw; - } - - public function getRed(): int { - return ($this->raw >> 16) & 0xFF; - } - - public function getGreen(): int { - return ($this->raw >> 8) & 0xFF; - } - - public function getBlue(): int { - return $this->raw & 0xFF; - } - - public function toString(): IString { - return new AString('#' . str_pad(dechex($this->raw & 0xFFFFFF), 6, '0', STR_PAD_LEFT)); - } -} diff --git a/tools/precommit.sh b/tools/precommit.sh old mode 100644 new mode 100755