BobboHobbo
2012-04-28 21:34:05
I noticed that MakeCompass wasnt working, therefore i looked into it and found that the N letter on the Compass has been changed to 0 colour ! unless it changes now?
Well heres my fix.
Well heres my fix.
Function rs_GetCompassAngleRadians: Extended;
var
TPA: TPointArray;
T, M: TPoint;
B: TBox;
begin
B := IntToBox(529, 9, 557, 39);
with B do
FindColorsSpiralTolerance(T.x, T.y, TPA, 0, x1, y1, x2, y2, 0);
if Length(TPA) < 1 then
Exit;
M := MiddleBox(B);
T := MiddleTPA(TPA);
Result := ArcTan2(-(T.Y - M.Y), T.X - M.X+0.5) + Radians(90);
Result := fixRad(Result - Pi);
end;