THotPDF.SetLoadedAnnotationColor Method
Sets the RGB colour of a specific annotation on a specified page of the loaded PDF, used to change the display colour of the annotation's icon or border
Declaration
procedure SetLoadedAnnotationColor(PageIndex, AnnotationIndex: Integer; AR, AG, AB: Single);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
AnnotationIndex | Zero-based annotation index in the page's annotation list |
AR | Red component, ranging from 0.0 to 1.0 |
AG | Green component, ranging from 0.0 to 1.0 |
AB | Blue component, ranging from 0.0 to 1.0 |
Usage notes
This member returns no value
Usage notes
- Use this API in the graphics and colour management workflow before the affected page, resource, field or catalogue object is finalised
- Colour component values must lie between 0.0 and 1.0; values outside that range may be clipped or behave unpredictably
- The actual visual effect of the colour depends on the annotation type; text annotations affect the icon colour, whilst highlight annotations affect the transparent fill colour
- The document must be saved after modification to make the colour changes persistent; different PDF viewers may have variations in rendering annotation colours