Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSVclSVG > RSSVG > Classes > TSVGGraphicElement > Methods

TSVGGraphicElement.Draw(TSVGMatrix,TCanvas,TRect) 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: RSSVG

Parameters

aMatrix

Type: System.Void

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

Canvas

Type: TCanvas

Canvas to draw on

aRect

Type: TRect

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