Advertisement
Janilabo

mSortByHeat

Mar 27th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.65 KB | None | 0 0
  1. {$loadlib MIMUPlugin.dll}
  2.  
  3. const
  4.   SHAPE_COLOR = 2366701;
  5.   DEBUG_SHAPE_COLOR = 16777215;
  6.   DEBUG_HEAT_COLOR = 65280;
  7.   PERCENT = 40;
  8.  
  9. var
  10.   TPA: TPointArray;
  11.   bmp, width, height: Integer;
  12.  
  13. begin                       //0,1,2,3 4,5,6 7,8,9
  14.   GetClientDimensions(width, height);
  15.   FindColors(TPA, SHAPE_COLOR, 0, 0, (width - 1), (height - 1));
  16.   bmp := CreateBitmap(width, height);
  17.   DrawTPABitmap(bmp, TPA, DEBUG_SHAPE_COLOR);
  18.   mSortByHeat(TPA, sd4Ways, True);
  19.   SetLength(TPA, Trunc(mPercentage(PERCENT, Length(TPA))));
  20.   DrawTPABitmap(bmp, TPA, DEBUG_HEAT_COLOR);
  21.   DisplayDebugImgWindow(width, height);
  22.   DrawBitmapDebugImg(bmp);
  23. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement