That's weird, because it worked perfectly with 65536, not sure why it doesn't like other colours.
I'm looking into it and seeing what's wrong.
That's weird, because it worked perfectly with 65536, not sure why it doesn't like other colours.
I'm looking into it and seeing what's wrong.
SCAR Code:function PercentColorMMEx(Color, Tol, StartRadial, EndRadial, StartRadius, EndRadius: Integer): integer;
var
TPA: TPointArray;
begin
FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, Tol);
FilterPointsPie(TPA, StartRadial, EndRadial, StartRadius, EndRadius, MMCX, MMCY);
Result := Round((Length(TPA) * 100) / ((Pi * (EndRadius * EndRadius)) * ((EndRadial - StartRadial) / 360.0)-((Pi * (StartRadius * StartRadius)) * ((EndRadial - StartRadial) / 360.0))));
end;
Fixed, and if anyone would be in need of a simpler version:
SCAR Code:function PercentColorMM(Color, Tol): Integer;
begin
Result := PercentColorMMEx(Color, Tol, 0, 360, 0, 76);
end;






Ok committed.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)