PDFium Component Docs

συμβάν OnPaint

Component: TPdfView  ·  Unit: PDFium
Fired after the view has finished painting the current page.

Syntax

property OnPaint: TNotifyEvent;

Description

Fired after the view has finished painting the current page. Η παράμετρος Sender αναφέρεται στην περίσταση TPdfView που προκάλεσε το συμβάν, ώστε ένας μόνο χειριστής να εξυπηρετεί πολλαπλές προβολές ελέγχοντας το Sender.

Typical uses include: draw custom overlays (watermarks, redaction marks, search highlights) on the rendered page. Επειδή ο χειριστής εκτελείται στο κύριο νήμα VCL, μπορείτε να ενημερώσετε controls φόρμας και να καλέσετε άλλα VCL APIs άμεσα.

Οι χειριστές πρέπει να επιστρέφουν γρήγορα — PDFium rendering and form filling occur on the same thread, and any delay here postpones the next page repaint.

Remarks

Example

procedure TForm1.PdfViewOnPaint(Sender: TObject);
begin
  // draw custom overlays (watermarks, redaction marks, search highlights) on the rendered page
  Caption := Format('OnPaint on page %d', [PdfView1.PageNumber]);
end;

See Also

OnClick, OnPageChange, OnMouseDown, PageNumber