Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSFMXSVG > FMX.RS.SVG > Classes > TSVGGraphicElement > Methods

TSVGGraphicElement.Draw(TSVGMatrix,TSVGCanvas,TSVGRect) Method

Scroll Prev Top Next More

Draw the SVG to the specified canvas inside the specified rectangle. The matrix parameter specifies the cumulative transformations from the Parent element (and its Parents) to apply when drawing the element.

Namespace: FMX.RS.SVG

Parameters

aMatrix

Type: System.Void

cumulative transformations from the Parent element (and its Parents) to apply when drawing the element.

Canvas

Type: System.Void

Canvas to draw on

aRect

Type: System.Void

Rectangle to draw within

The VCL code is only slightly more complicated:

Delphi

uses
   RSSVGTypes, RSGraphics;
 
 procedure TForm1.PaintBox1Paint(Sender: TObject);
 var
   aCanvas: TSVGCanvas;
 begin
   aCanvas := TSVGCanvas.Create(PaintBox1.Canvas);
   try
     Doc.Draw(aCanvas, RectToRSRect(PaintBox1.ClientRect));
   finally
     aCanvas.Free;
   end;
 end;

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb