unit
	LibVu;

interface

uses	LibV, Graphics;

type
	TMetaCanvas = class(TCanvas)
    public
    	function	Init(name:string;mmWidth,mmHeight:integer):Boolean;
        destructor	Destroy;override;
    private
    	mf		: wmf_p;
    end;

implementation

function	TMetaCanvas.Init;
begin
	mf:=wmfCreate(pchar(name),mmWidth,mmHeight);
    if mf <> nil then
    begin
    	Handle:=wmfGetDevice(mf);
    	Font.PixelsPerInch:=67;
		Font.Name:='Arial';
    	Result:=True;
    end
    else
    	Result:=False;
end;

destructor	TMetaCanvas.Destroy;
begin
	if mf<>nil then
    	wmfClose(mf);
end;

end.
