Example #1
0
 /**
  * Reads color informations
  * 
  * @param Color $color
  */
 public function readColor(Color $color)
 {
     $color->setR($this->reader->readUnsignedByte());
     $color->setG($this->reader->readUnsignedByte());
     $color->setB($this->reader->readUnsignedByte());
     $this->reader->skip();
 }
Example #2
0
 private function writeColor(Color $color)
 {
     $this->writeUnsignedByte($color->getR());
     $this->writeUnsignedByte($color->getG());
     $this->writeUnsignedByte($color->getB());
     $this->writeByte(0);
 }