Download Now
Forums

    Reference TSvgRender

    Declared in Codebot.Render.SVG.pas on line 265

    TSvgRender reads an SVG document and draws it on a canvas
      TSvgRender = class
      public
        constructor Create(Canvas: ICanvas);
        destructor Destroy; override;
        { Read the document from SVG text }
        procedure Parse(const Xml: string);
        { Read the document from an SVG file }
        procedure ParseFile(const FileName: string);
        { Draw the document in color }
        procedure Draw;
        { Draw the outlines of the shapes }
        procedure DrawOutline(PenWidth: Float);
        { Draw the nodes of the shapes }
        procedure DrawNodes(PenWidth: Float);
        { Draw the document at a point with a scale and an angle }
        procedure DrawAt(X, Y, Scale, Angle, Size: Float; Options: TSvgRenderOptions = [renderColor]; PenWidth: Float = 1);
        property DocumentSize: Integer read FDocumentSize;
        property NodeCount: Integer read FNodeCount;
        { The view box of the document }
        property ViewBox: TRectF read GetViewBox;
      end;

    See also

    Float in Codebot.System.pas
    ICanvas in Codebot.Render.Graphics.pas
    TRectF in Codebot.Graphics.Types.pas