-
Notifications
You must be signed in to change notification settings - Fork 534
Open
Milestone
Description
Shadow does not work with AutoShape
use PhpOffice\PhpPresentation\Shape\AutoShape;
...
$autoShape = new AutoShape();
$autoShape->setType(AutoShape::TYPE_ROUNDED_RECTANGLE)
->setWidthAndHeight(160, 90)
->setOffsetX(10)
->setOffsetY(10);
$autoShape->getFill()
->setFillType(Fill::FILL_SOLID)
->setStartColor(new Color('FFF5B356'));
$autoShape->getShadow()
->setVisible(true)
->setDirection(45)
->setDistance(5);
$slide->addShape($autoShape);
but it works for RichTextShape
$shape = $slide->createRichTextShape()
->setWidthAndHeight(160, 90)
->setOffsetX(10)
->setOffsetY(10);
$shape->getFill()
->setFillType(Fill::FILL_SOLID)
->setStartColor(new Color('FFF5B356'));
$shape->getShadow()
->setVisible(true)
->setAlpha(5)
->setDirection(45)
->setDistance(5);