SpotRegistryInterface

Registers spot colors and writes them as PDF Separation objects.

Namespace: Com\Tecnick\Color

interface SpotRegistryInterface

Source: src/SpotRegistryInterface.php:40

Registers spot colors and writes them as PDF Separation objects.

Implemented by Spot.

Methods

addSpotColor()

Add a new spot color or overwrite an existing one with the same name.

public addSpotColor(string $name, Cmyk $cmyk): string

Parameters:

  • $name (string): Full name of the spot color.
  • $cmyk (Cmyk): CMYK color object

Returns: string: Spot color key.

Throws:

  • Exception: if the name is unusable or the color has already been emitted

Source: src/SpotRegistryInterface.php:52

addSpotLabColor()

Add a new Lab-based spot color or overwrite an existing one with the same name.

public addSpotLabColor(
    string $name,
    float $lstar,
    float $astar,
    float $bstar,
    array<int,float> $labOptions
): string

Parameters:

  • $name (string): Full name of the spot color.
  • $lstar (float): Lab L* component in [0..100].
  • $astar (float): Lab a* component.
  • $bstar (float): Lab b* component.
  • $labOptions (array<int,float>): Optional Lab settings: whitepoint, blackpoint, range, col0.

Returns: string: Spot color key.

Throws:

  • Exception: if the name is unusable or the color has already been emitted

Source: src/SpotRegistryInterface.php:67

getPdfSpotObjects()

Returns the PDF command to output Spot color objects.

public getPdfSpotObjects(int &$pon): string

Parameters:

  • $pon (int): Current PDF object number

Returns: string: PDF command

Source: src/SpotRegistryInterface.php:100

getPdfSpotResources()

Returns the PDF command to output Spot color resources.

public getPdfSpotResources(): string

Returns: string: PDF command

Throws:

  • Exception: if a registered spot color has not been emitted

Source: src/SpotRegistryInterface.php:109

getPdfSpotResourcesByKeys()

Returns the PDF command to output the Spot color resources for the given keys.

public getPdfSpotResourcesByKeys(string[] $keys): string

Parameters:

  • $keys (string[]): Array of spot color keys.

Returns: string: PDF command

Throws:

  • Exception: if a key is not registered or has not been emitted

Source: src/SpotRegistryInterface.php:120

getSpotColorObj()

Return a copy of the requested spot color CMYK object.

public getSpotColorObj(string $name): Cmyk

Parameters:

  • $name (string): Full name of the spot color.

Returns: Cmyk

Throws:

Source: src/SpotRegistryInterface.php:82

getSpotLabColorObj()

Return a copy of the requested spot color Lab object.

public getSpotLabColorObj(string $name): Lab

Parameters:

  • $name (string): Full name of the spot color.

Returns: Lab

Throws:

Source: src/SpotRegistryInterface.php:91