Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program new;
- {$I SRL/OSR.simba}
- {$IFDEF LINUX}
- const LINUX_DEBUG_MINSIZE = 128;
- procedure DrawBitmapDebugImg(bmp: Integer); override;
- var
- nW,nH, W,H, x1,y1:Int32;
- tmp: TMufasaBitmap;
- begin
- GetBitmapSize(bmp, W,H);
- if (W < LINUX_DEBUG_MINSIZE) or (H < LINUX_DEBUG_MINSIZE) then
- begin
- nW := Max(LINUX_DEBUG_MINSIZE, W);
- nH := Max(LINUX_DEBUG_MINSIZE, H);
- tmp := GetMufasaBitmap(CreateBitmap(nW,nH));
- tmp.ReplaceColor(0, 15790320);
- x1 := Trunc(nW / 2 - W / 2);
- y1 := Trunc(nH / 2 - H / 2);
- FastDrawTransparent(x1, y1, bmp, tmp.GetIndex());
- Inherited(tmp.GetIndex());
- tmp.Free();
- end else
- Inherited(bmp);
- end;
- procedure DisplayDebugImgWindow(W,H:Int32); override;
- begin
- Inherited(Max(LINUX_DEBUG_MINSIZE, W), Max(LINUX_DEBUG_MINSIZE, H));
- end;
- {$ENDIF}
- begin
- GetMufasaBitmap(BitmapFromClient(Box(0,0,54,216))).Debug();
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement