The TSVGDocument class is the base class for parsing a SVG and generating TSVGxxxElement classes to describe the SVG. Use the TSVGDocument class to load an SVG and paint the SVG to a TCanvas.
The TSVGDocument is only available at run-time. The TRSSVGDocument (VCL) and TRSFMXSVGDocument (FMX) components expose the TSVGDocument for loading at design-time. To use the TSVGDocument to load an SVG, perform the following steps:
procedure TForm20.FormCreate(Sender: TObject); Doc.LoadFromFile('c:\MySVG.svg'); |
The TSVGDocument can be drawn to any TCanvas. The following code paints to a TPaintBox.Canvas: procedure TForm20.PaintBox1Paint(Sender: TObject; Canvas: TCanvas); |