Is it possible to draw a path with transparent background?
If you mean transparent as in just a stroke instead of a fill, then yes this is possible.
uses
FMX.TMSFNCGraphicsPDFEngine, FMX.TMSFNCGraphicsTypes;
procedure TForm1.Button1Click(Sender: TObject);
var
e: TTMSFNCGraphicsPDFEngine;
pth: TTMSFNCGraphicsPath;
r: TRectF;
begin
TMSFNCPDFLib1.BeginDocument('test.pdf');
e := TTMSFNCGraphicsPDFEngine.Create(TMSFNCPDFLib1);
try
TMSFNCPDFLib1.NewPage;
pth := TTMSFNCGraphicsPath.Create;
try
r := RectF(100, 100, 300, 200);
pth.AddEllipse(r);
e.Stroke.Color := gcRed;
e.DrawText(r, 'Hello World', False, gtaCenter, gtaCenter);
e.DrawPath(pth, pdmPolyline);
finally
pth.Free;
end;
finally
e.Free;
TMSFNCPDFLib1.EndDocument(True);
end;
end;
If you mean , semi opaque or translucent then unfortunately no, it’s either fully drawn or not drawn.