|
33 | 33 | $shape = $oMasterSlide->createLineShape(0, 672, 960, 672)->getBorder()->setColor(new Color(Color::COLOR_WHITE))->setLineWidth(2);
|
34 | 34 | $shape = $oMasterSlide->createLineShape(0, 674, 960, 674)->getBorder()->setColor(new Color(Color::COLOR_DARKBLUE))->setLineWidth(2);
|
35 | 35 | // Title placeholder
|
36 |
| -$shape = $oMasterSlide->createRichTextShape()->setWidthAndHeight(960, 80)->setOffsetX(0)->setOffsetY(60); |
| 36 | +$shape = $oMasterSlide->createRichTextShape(); |
| 37 | +$shape->setWidthAndHeight(960, 80)->setOffsetX(0)->setOffsetY(60); |
37 | 38 | $shape->getFill()->setFillType(Fill::FILL_SOLID)->setStartColor(new Color(Color::COLOR_BLUE));
|
38 | 39 | $shape->getActiveParagraph()->getAlignment()
|
39 | 40 | ->setHorizontal(Alignment::HORIZONTAL_RIGHT)->setMarginLeft(200)->setMarginRight(50)
|
|
46 | 47 | $textRun->getFont()->setBold(true)->setSize(30)->setColor(new Color(Color::COLOR_WHITE));
|
47 | 48 | $shape->setPlaceHolder(new Placeholder(Placeholder::PH_TYPE_TITLE));
|
48 | 49 | // Date placeholder
|
49 |
| -$shape = $oMasterSlide->createRichTextShape()->setWidthAndHeight(140, 38)->setOffsetX(50)->setOffsetY(680); |
| 50 | +$shape = $oMasterSlide->createRichTextShape(); |
| 51 | +$shape->setWidthAndHeight(140, 38)->setOffsetX(50)->setOffsetY(680); |
50 | 52 | $shape->getActiveParagraph()->getAlignment()
|
51 | 53 | ->setHorizontal(Alignment::HORIZONTAL_LEFT)
|
52 | 54 | ->setVertical(Alignment::VERTICAL_BASE);
|
53 | 55 | $shape->setAutoFit(RichText::AUTOFIT_NORMAL);
|
54 | 56 | $textRun = $shape->createTextRun('01-02-2000')->getFont()->setSize(18);
|
55 | 57 | $shape->setPlaceHolder(new Placeholder(Placeholder::PH_TYPE_DATETIME))->getPlaceholder()->setIdx(10);
|
56 | 58 | // Footer placeholder
|
57 |
| -$shape = $oMasterSlide->createRichTextShape()->setWidthAndHeight(468, 38)->setOffsetX(246)->setOffsetY(680); |
| 59 | +$shape = $oMasterSlide->createRichTextShape(); |
| 60 | +$shape->setWidthAndHeight(468, 38)->setOffsetX(246)->setOffsetY(680); |
58 | 61 | $shape->getActiveParagraph()->getAlignment()
|
59 | 62 | ->setHorizontal(Alignment::HORIZONTAL_CENTER)
|
60 | 63 | ->setVertical(Alignment::VERTICAL_BASE);
|
61 | 64 | $shape->setAutoFit(RichText::AUTOFIT_NORMAL);
|
62 | 65 | $textRun = $shape->createTextRun('Placeholder for Footer')->getFont()->setSize(18);
|
63 | 66 | $shape->setPlaceHolder(new Placeholder(Placeholder::PH_TYPE_FOOTER))->getPlaceholder()->setIdx(11);
|
64 | 67 | // Slidenumber placeholder
|
65 |
| -$shape = $oMasterSlide->createRichTextShape()->setWidthAndHeight(140, 38)->setOffsetX(770)->setOffsetY(680); |
| 68 | +$shape = $oMasterSlide->createRichTextShape(); |
| 69 | +$shape->setWidthAndHeight(140, 38)->setOffsetX(770)->setOffsetY(680); |
66 | 70 | $shape->getActiveParagraph()->getAlignment()
|
67 | 71 | ->setHorizontal(Alignment::HORIZONTAL_RIGHT)
|
68 | 72 | ->setVertical(Alignment::VERTICAL_BASE);
|
|
86 | 90 |
|
87 | 91 | // Create a shape (text) linked to a PlaceHolder
|
88 | 92 | echo date('H:i:s') . ' Create a shape (rich text)' . EOL;
|
89 |
| -$shape = $currentSlide->createRichTextShape()->setWidthAndHeight(960, 80)->setOffsetX(0)->setOffsetY(60); |
| 93 | +$shape = $currentSlide->createRichTextShape(); |
| 94 | +$shape->setWidthAndHeight(960, 80)->setOffsetX(0)->setOffsetY(60); |
90 | 95 | $shape->getFill()->setFillType(Fill::FILL_SOLID)->setStartColor(new Color(Color::COLOR_BLUE));
|
91 | 96 | $shape->getActiveParagraph()->getAlignment()
|
92 | 97 | ->setHorizontal(Alignment::HORIZONTAL_RIGHT)->setMarginLeft(200)->setMarginRight(50)
|
|
0 commit comments