ImageEn, unit iexPdfiumCore |
|
TPdfAnnotationList.NewAnnotation
Declaration
function NewAnnotation(const R: TDRect; AnnotType: TPdfAnnotationSubType): Boolean; overload;
function NewAnnotation(const R: TDRect; AnnotType: TPdfAnnotationSubType; BorderColor, FillColor: TRGBA): Boolean; overload;
Description
Adds an annotation to the page at the specified position.
At this time, only patSquare or patCircle should be adding using this method.
The second overload initialize the annotation with a border and fill of the specified color and transparency
Note:
◼For patText, use
NewTextAnnotation
◼For patLink, use
NewLinkAnnotation
| Demos\PDF\PDFAnnotations\PdfAnnotations.dpr |
// Add an ellipse to the page (blue border and half-transparent red fill)
ImageEnView1.PdfViewer.Annotations.NewAnnotation( R, patCircle, TColor2TRGBA( clBlue, 255 ), TColor2TRGBA( clRed, 125 ));
// Add an rectangle to the page (green border and yellow fill)
ImageEnView1.PdfViewer.Annotations.NewAnnotation( R, patSquare, TColor2TRGBA( clGreen, 255 ), TColor2TRGBA( clYellow, 255 ));
See Also
◼NewTextAnnotation
◼NewLinkAnnotation
◼TColor2TRGBA