GetAnnotColor
Annotations and hotspot links
Description
Reads the stroke color of an annotation on the selected page from its /C array and returns the red, green and blue components as values from 0 to 1
When the annotation carries no explicit color the function reports the default black (0, 0, 0) and signals the absence through its return value
Syntax
Delphi
Function TPDFlib.GetAnnotColor(Index: Integer; Out Red, Green, Blue: Double): Integer;
Parameters
| Index | 1-based annotation index on the selected page |
|---|---|
| Red | Receives the red component from 0 to 1 |
| Green | Receives the green component from 0 to 1 |
| Blue | Receives the blue component from 0 to 1 |
Return values
| 1 | The annotation has a /C array and the components were read from its first three numeric elements |
|---|---|
| 0 | The annotation has no /C array, the index is invalid, or no document is loaded; the components are left at the default black (0, 0, 0) |
Remarks
A /C array with fewer than three numeric elements yields 0 for each missing component
See also
GetAnnotInteriorColor, SetAnnotBorderColor, SetAnnotInteriorColor