PDA

View Full Version : Precision MM Snippet



Le Jingle
09-17-2012, 06:52 AM
Made a snippet to get colors on the MM more accurately than using MMX1, MMY1, MMX2, MMY2 - which was causing me problems when it found colors outside the Circle and in the interface overlay on the mainframe/main screen.

It takes a good bit longer, but it helps gather data / use data with some better precision when you run into the colors that conflict with each other (the MM box goes beyond the circle, in order to grab the entirety of the circle).

I don't necessarily think that this would be worthy for a suggestion, as some functions already account properly for the Circle/Ellipse shape of the MM.



function GetMMColors(ClearSame: Boolean): TIntegerArray;
var
i: Integer;
TPA: TPointArray;
begin
TPAFromEllipseWrap(MMCx, MMCy, 76, 76, TPA);
FillEllipse(TPA);
SetLength(result, high(TPA) + 1);
for i := 0 to high(TPA) do
result[i] := GetColor(tpa[i].x, tpa[i].y);
if (ClearSame) then
ClearSameIntegers(result);
end;



Cheers,
Lj