SetaPDF_Core_DataStructure_Color Abstract class for color structures
File: /SetaPDF v2/Core/DataStructure/Color.php
Class hierarchy
Summary
Properties
Static Methods
createByComponents()
Create an instance by a PDF array object, PHP array or a hexadecimal string of an RGB value.
Parameters
- $components
Exceptions
Throws InvalidArgumentException
hexToRgb()
Converts a hex encoded string into a component array of red, green and blue values.
Parameters
- $hex
writePdfString()
Writes the colors components to a writer.
Parameters
- $writer : SetaPDF_Core_WriteInterface
- $components
- $stroking
writePdfStringByComponents()
Writes a color definition directly to a writer.
Parameters
- $writer : SetaPDF_Core_WriteInterface
- $components
- $stroking
Exceptions
Throws InvalidArgumentException
Methods
draw()
public SetaPDF_Core_DataStructure_Color::draw (
SetaPDF_Core_WriteInterface $writer [, $stroking = true ]
): voidWrite the color as a PDF string to a writer.
Parameters
- $writer : SetaPDF_Core_WriteInterface
- $stroking