Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

XelVectors---load-save-render-vector-images-in-Pure-Pascal

XelVectors - load, save, render vector images in Pure Pascal (SVG, EMF, WMF, CDR...)

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

XelVectors

Reads vector formats, renders them (GDI+ on Windows, Cairo on Linux) and saves to SVG / EMF.

Formats

  • CDR
  • CGM
  • DWG
  • DXF
  • EMF
  • MET
  • ODG
  • PS
  • SVG
  • WMF
  • XAML

Usage

Add to your project xelvectors_pkg.lpk and XelVectors:

pascal
uses XelVectors;

var
  Doc: TXVDocument;
  Bmp: TBitmap;
begin
  Doc := TXVDocument.Create;
  Bmp := TBitmap.Create;
  try
    Doc.LoadFromFile('rysunek.dwg');      // detect format
    Bmp.SetSize(800, 600);
    XVDrawToBitmap(Doc, Bmp);             // GDI+ (Windows) / Cairo (Linux)
    Doc.SaveToFile('rysunek.svg');        // or .emf
  finally
    Bmp.Free;
    Doc.Free;
  end;
end;