public function testSetOpacity() { $this->assertEquals(50, $this->alpha->getOpacity()); $this->assertEquals(0.5, $this->alpha->getValue()); $opacity = 30; $this->alpha->setOpacity($opacity); $this->assertEquals($opacity, $this->alpha->getOpacity()); $this->assertEquals(0.3, $this->alpha->getValue()); }
/** * Returns object properties as array * * @return array */ public function toArray() { $options = array(); if (isset($this->alpha)) { $options['backgroundAlpha'] = $this->alpha->getValue(); } if (isset($this->color)) { $options['backgroundColor'] = $this->color->toString(); } return $options; }
/** * Returns object properties as array * * @return array */ public function toArray() { $options = array(); if (isset($this->alpha)) { $options['borderAlpha'] = $this->alpha->getValue(); } if (isset($this->color)) { $options['borderColor'] = $this->color->toString(); } if (isset($this->thickness)) { $options['borderThickness'] = $this->thickness; } return $options; }