Event: OnDrawText

Occurs at discrete points during the representing (either displaying or printing) of the human readable text. Write an OnDrawText event handler to customize the representing of the human readable text at various stages before it is represented.



{ Defined in the pBarcode1D unit }

TBarcodeCustomParameters = record
Alpha: Double;
Origin: TPoint;
Offset: TPoint;
DensityRate: Double;
FullEncoded: string;
Text: string;
DisplayText: TDisplayText;
TextPosition: TTextPosition;
TextAlignment: TTextAlignment;
TextFont: TFont;
ExtraFontSize: Integer;
LeftQuietZone_Spacing: Integer;
RightQuietZone_Spacing: Integer;
LeftQuietZone_Width: Integer;
RightQuietZone_Width: Integer;
LeftQuietText_Height: Integer;
RightQuietText_Height: Integer;
Symbol_Width: Integer;
Symbol_Height: Integer;
Symbol_V_Offset: Integer;
Symbol_H_Offset: Integer;
Total_Left: Integer;
Total_Top: Integer;
Total_Width: Integer;
Total_Height: Integer;


{ Defined in the pCore1D unit }

TDrawTextStep = (dtsPrepare, dtsClean, dtsPrint);

{ Defined in the pBarcode1D unit }

TOnDrawText = procedure (Sender: TObject; Canvas: TCanvas; Step: TDrawTextStep; var BarcodeParameters: TBarcodeCustomParameters; var Continue: Boolean; var LeftTop, RightBottom: TPoint; var PDx: PInteger) of object;

property OnDrawText: TOnDrawText;


See diagram: