SVG Canvas library

SVG Canvas example
  • converts canvas drawing to SVG format
  • available for Delphi/C++ Builder 6 - 10.3 and Lazarus 1.8
  • source code included in registered version
  • royalty free distribution in applications


with TSvgCanvas.Create('image.svg', Canvas) do
  Pen.Color := clRed;
  Pen.Width := 2;
  Brush.Color := clYellow;
  Ellipse(10, 10, 220, 120);


  ESvgError = class(Exception)

  TSvgCanvas = class
    constructor Create(Stream: TStream; Canvas: TCanvas);
    constructor Create(const FileName: string; Canvas: TCanvas);

    procedure Ellipse(X1, Y1, X2, Y2: Integer);
    procedure Ellipse(const Rect: TRect);
    procedure FillRect(const Rect: TRect);
    procedure FrameRect(const Rect: TRect);
    function HandleAllocated: Boolean;
    procedure LineTo(X, Y: Integer);
    procedure Lock;
    procedure MoveTo(X, Y: Integer);
    procedure Polygon(const Points: array of TPoint);
    procedure Polyline(const Points: array of TPoint);
    procedure PolyBezier(const Points: array of TPoint);
    procedure PolyBezierTo(const Points: array of TPoint);
    procedure Rectangle(X1, Y1, X2, Y2: Integer);
    procedure Rectangle(const Rect: TRect);
    procedure Refresh;
    procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer);
    function TextExtent(const Text: string): TSize;
    function TextHeight(const Text: string): Integer;
    procedure TextOut(X, Y: Integer; const Text: WideString);
    function TextWidth(const Text: string): Integer;
    function TryLock: Boolean;
    procedure Unlock;

    property Handle: HDC read GetHandle write SetHandle;
    property LockCount: Integer read GetLockCount;
    property PenPos: TPoint read GetPenPos write SetPenPos;
    property OnChange: TNotifyEvent read GetOnChange write SetOnChange;
    property OnChanging: TNotifyEvent read GetOnChanging write SetOnChanging;

    property Brush: TBrush read GetBrush write SetBrush;
    property Font: TFont read GetFont write SetFont;
    property Pen: TPen read GetPen write SetPen;

Download and order

Order SVG Canvas license $40,- USD (license for one developer)
Order SVG Canvas multilicense $120,- USD (license for all developers in company)
Order SVG Canvas year upgrades $20,- USD (registered users only)
Order SVG Canvas year upgrades multilicense $60,- USD (registered multilicense users only)

Related links