← Back to Index

TFlexFMXAdvancedSignatureCapture

Touch-enabled signature capture control for collecting digital signatures with smooth drawing.

Key Properties

PenColor: TAlphaColor
Signature ink color.
PenWidth: Single
Signature line thickness.
BackgroundColor: TAlphaColor
Canvas background color.
ShowBaseline: Boolean
Display a horizontal baseline for signature.
BaselineText: string
Text to display below baseline (e.g., "Sign here").
Smoothing: Boolean
Enable stroke smoothing for natural appearance.
SignatureBitmap: TBitmap
Captured signature as bitmap image.
IsEmpty: Boolean (read-only)
True if no signature has been drawn.
MinStrokeLength: Single
Minimum stroke length to count as valid signature.

Usage Examples

Basic Signature Capture

SignatureCapture1.PenColor := TAlphaColors.Blue;
SignatureCapture1.PenWidth := 2;
SignatureCapture1.ShowBaseline := True;
SignatureCapture1.BaselineText := 'Sign above this line';
SignatureCapture1.Clear;

Save Signature

if not SignatureCapture1.IsEmpty then
begin
  SignatureCapture1.SignatureBitmap.SaveToFile('signature.png');
  ShowMessage('Signature saved');
end
else
  ShowMessage('Please sign first');

Load Existing Signature

var
  Bmp: TBitmap;
begin
  Bmp := TBitmap.Create;
  try
    Bmp.LoadFromFile('signature.png');
    SignatureCapture1.LoadFromBitmap(Bmp);
  finally
    Bmp.Free;
  end;
end;

Validation

procedure ValidateSignature;
begin
  if SignatureCapture1.IsEmpty then
  begin
    ShowMessage('Signature required');
    Exit;
  end;
  
  // Convert to base64 for storage
  var Base64 := BitmapToBase64(SignatureCapture1.SignatureBitmap);
  SaveSignatureToDatabase(Base64);
end;

Methods

Events

Notes

← Back to Index