PhpOffice\PhpPresentation\Shape\RichText::setInsetTop PHP Метод

setInsetTop() публичный Метод

Set top inset
public setInsetTop ( $value = 4.8 ) : RichText
$value float
Результат RichText
    public function setInsetTop($value = 4.8)
    {
        $this->topInset = $value;
        return $this;
    }

Usage Example

Пример #1
0
 public function testGetSetInset()
 {
     $object = new RichText();
     // Default
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetBottom());
     $this->assertEquals(4.8, $object->getInsetBottom());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetLeft());
     $this->assertEquals(9.6, $object->getInsetLeft());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetRight());
     $this->assertEquals(9.6, $object->getInsetRight());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetTop());
     $this->assertEquals(4.8, $object->getInsetTop());
     // Value
     $value = rand(1, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetBottom($value));
     $this->assertEquals($value, $object->getInsetBottom());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetLeft($value));
     $this->assertEquals($value, $object->getInsetLeft());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetRight($value));
     $this->assertEquals($value, $object->getInsetRight());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setInsetTop($value));
     $this->assertEquals($value, $object->getInsetTop());
 }