File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ # Shading Styles
2+
3+ ``` php
4+ <?php
5+
6+ use PhpOffice\PhpWord\Style\Shading;
7+ $phpWord->addParagraphStyle('pStyle', ['shading' => ['pattern' => Shading::PATTERN_SOLID, 'fill' => FF0000]]);
8+ $section->addText('Hello, World!', null, 'pStyle');
9+
10+ ```
11+
12+ ## Constants
13+ - ` PATTERN_CLEAR ` . No pattern.
14+ - ` PATTERN_SOLID ` . 100% fill pattern.
15+ - ` PATTERN_HSTRIPE ` . Horizontal stripe pattern.
16+ - ` PATTERN_VSTRIPE ` . Vertical stripe pattern.
17+ - ` PATTERN_DSTRIPE ` . Diagonal stripe pattern.
18+ - ` PATTERN_HCROSS ` . Horizontal cross pattern.
19+ - ` PATTERN_DCROSS ` . Diagonal cross pattern.
20+
21+ ## Options
22+ - ` color ` . Shading pattern color, e.g. * FF0000* .
23+ - ` fill ` . Shading background color, e.g. * FF0000* .
24+ - ` pattern ` . Shading pattern.
25+ * See constants above for possible values.
26+
27+ ## Used In
28+ - [ ` Style > Paragraph ` ] ( ../styles/paragraph.md ) .
You can’t perform that action at this time.
0 commit comments