Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SpotColor | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Pdf\Writer; |
| 6 | |
| 7 | use Phpdftk\Pdf\Core\Graphics\ColorSpace\Separation; |
| 8 | |
| 9 | /** |
| 10 | * Handle for a registered spot color. Bundles the colorant name with |
| 11 | * the {@see Separation} value object so {@see Writer\Page::useSpotColor()} |
| 12 | * can register it on a page under a stable resource name. |
| 13 | * |
| 14 | * Returned by {@see PdfDoc::registerSpotColor()}. Treat as opaque — |
| 15 | * pass it to a page's `useSpotColor()` to obtain the resource name to |
| 16 | * feed into `ContentStream::setFillColorSpace()` / |
| 17 | * `setStrokeColorSpace()`. |
| 18 | */ |
| 19 | final class SpotColor |
| 20 | { |
| 21 | public function __construct( |
| 22 | public readonly string $name, |
| 23 | public readonly Separation $separation, |
| 24 | ) {} |
| 25 | } |