DrawTextOutLine

Top  Previous  Next

 

procedure DrawTextOutline(const Canvas: TCanvas; const X, Y: Integer;

const Text: string);

var

OldBkMode: Integer;  // stores previous background mode

begin

OldBkMode := SetBkMode(Canvas.Handle, TRANSPARENT);

BeginPath(Canvas.Handle);

Canvas.TextOut(X, Y, Text);

EndPath(Canvas.Handle);

StrokeAndFillPath(Canvas.Handle);

SetBkMode(Canvas.Handle, OldBkMode);

end;