1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-08-13 16:53:59 -04:00
Simba/Units/MMLAddon/PSInc/Wrappers/bitmap.inc
Raymond 150ad9fcf1 Added Bitmaps
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@46 3f818213-9676-44b0-a9b4-5e4c4e03d09d
2009-09-13 02:18:35 +00:00

45 lines
1.1 KiB
PHP

function CreateBitmap(w,h : integer):integer;
begin
result := CurrThread.Client.MBitmaps.CreateBMP(w,h);
end;
procedure FreeBitmap(Number : integer);
begin
CurrThread.Client.MBitmaps.FreeBMP(Number);
end;
procedure SaveBitmap(Bmp : integer; path : string);
begin;
CurrThread.Client.MBitmaps.Bmp[Bmp].SaveToFile(Path);
end;
function BitmapFromString(Width,height : integer; Data : string) : integer;
begin;
Result := CurrThread.Client.MBitmaps.CreateBMPFromString(Width,Height,Data);
end;
function LoadBitmap(Path : String) : integer;
begin;
Result := CurrThread.Client.MBitmaps.CreateBMPFromFile(Path);
end;
procedure SetBitmapSize(Bmp,NewW,NewH : integer);
begin;
if (NewW>=0) and (NewH >=0) then
CurrThread.Client.MBitmaps.Bmp[Bmp].SetSize(NewW,NewH);
end;
procedure GetBitmapSize(Bmp : integer; var BmpW,BmpH : integer);
begin;
With CurrThread.Client.MBitmaps.Bmp[bmp] do
begin;
BmpW := width;
BmpH := Height;
end;
end;
function CreateMirroredBitmap(Bmp : integer) : integer;
begin;
Result := CurrThread.Client.MBitmaps.CreateMirroredBitmap(Bmp);
end;