Janilabo

lulcoffin

Sep 18th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.59 KB | None | 0 0
  1. {$loadlib pumbaa.dll}
  2.  
  3. procedure DebugBitmap(bmp: Integer);
  4. var
  5.   w, h: Integer;
  6. begin
  7.   GetBitmapSize(bmp, w, h);
  8.   DisplayDebugImgWindow(w, h);
  9.   DrawBitmapDebugImg(bmp);
  10. end;
  11.  
  12. var
  13.   shape, TPA: TPointArray;
  14.   bmp, t: Integer;
  15.  
  16. begin
  17.   bmp := CreateBitmap(500, 500);
  18.   shape := [Point(200, 50), Point(300, 50), Point(400, 200), Point(300, 450), Point(200, 450), Point(100, 200)];
  19.   t := GetSystemTime;
  20.   pp_TPAFromPolygon(shape, TPA);
  21.   WriteLn(IntToStr(GetSystemTime - t) + ' ms.');
  22.   DrawTPABitmap(bmp, TPA, 16777215);
  23.   DrawTPABitmap(bmp, shape, 255);
  24.   DebugBitmap(bmp);
  25. end.
Advertisement
Add Comment
Please, Sign In to add comment