Hide Comments
Hide Comments

TSVGGraphicElement.Draw(TSVGMatrix,TCanvas,TRect) Method

Comments (0)

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

expandingSyntax

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

expandingExamples

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;

expandingSee Also

Comments (0)

RiverSoftAVG SVG Component Library (RSCL) © 2013-2016, Thomas G. Grubb