Skip to content

Commit d6b38fd

Browse files
authored
Create shading.md
1 parent 1a285b8 commit d6b38fd

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/usage/styles/shading.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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).

0 commit comments

Comments
 (0)