PhpOffice\PhpPresentation\Shape\RichText::setAutoFit PHP Method

setAutoFit() public method

Set autofit
public setAutoFit ( $value = self::AUTOFIT_DEFAULT, $fontScale = null, $lnSpcReduction = null ) : RichText
$value string
$fontScale float
$lnSpcReduction float
return RichText
    public function setAutoFit($value = self::AUTOFIT_DEFAULT, $fontScale = null, $lnSpcReduction = null)
    {
        $this->autoFit = $value;
        if (!is_null($fontScale)) {
            $this->fontScale = $fontScale;
        }
        if (!is_null($lnSpcReduction)) {
            $this->lnSpcReduction = $lnSpcReduction;
        }
        return $this;
    }

Usage Example

Esempio n. 1
0
 public function testGetSetAutoFit()
 {
     $object = new RichText();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setAutoFit());
     $this->assertEquals(RichText::AUTOFIT_DEFAULT, $object->getAutoFit());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\RichText', $object->setAutoFit(RichText::AUTOFIT_NORMAL));
     $this->assertEquals(RichText::AUTOFIT_NORMAL, $object->getAutoFit());
 }